Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Force Visual Studio to Run Website in https

A lot of my website requires https but when I launch my ASP.NET MVC website from Visual Studio, it loads in http.

When I navigate to a page that requires https, on a controller that has the [RequireHttps] attribute it doesn't know that the https version of the site is running on port 44300, so it just attempts to redirect to https://localhost/login (default port).

Am I missing some kind of configuration? I have SSL Enabled = true in the properties for the MVC project.

I want to just be able to navigate my site as I would normally as if it were hosted on my server

Is this possible?

like image 362
Luke Avatar asked Sep 12 '15 11:09

Luke


1 Answers

Right click on your project and select Properties. Select Web tab. In Servers section you can change your project url to use https instead.

like image 179
Hamid Pourjam Avatar answered Oct 04 '22 17:10

Hamid Pourjam