Share via


Visual Studio opening https://localhost:50382/ instead of regular http://localhost:50382

Question

Sunday, February 21, 2021 10:45 AM

Hi,

I can not test any of my websites any more on my localhost.

When I press F5 in Visual Studio it open a https://localhost:50382 and gives an error not secure and I can not test any of my web projects.

How can I remove this HTTPS and use only HTTP for local host?

I do not remember changing anything in Visual Studio, I also tried to uninstall and reinstall complete visual studio but it did not help.

Any suggestions?

Thx

All replies (2)

Sunday, February 21, 2021 3:12 PM

What is the actual error?  Are you sure the problem is SSL?

How can I remove this HTTPS and use only HTTP for local host?

Click on the project in solution explorer.  Then from the properties window you can set the whether SSL Enabled is true or false.


Monday, February 22, 2021 2:11 AM

Hi westgatezagreb,

I'm guessing that you may have an error of "You can't remove SSL from this site because this Web project is currently configured to browse with this URL. You need to use the Web property page to change the project URL to the non-secure URL first." if you left click your project in "Solution Explorer" and you set SSL false in the property.

You also need do this:

Right-clicked on the project --> Select  "Properties"--> Left-clicked "Web" on the left panel--> Change "https" to "http" and save it  on "Project Url" page.

More details,you could refer to below articles:

https://forums.asp.net/t/2162769.aspx?New+Project+Created+Using+VS+2019+Always+Uses+SSL

https://www.pluralsight.com/guides/visual-studio-2017-resolving-ssl-tls-connections-problems-with-iis-express

Best regards,

Yijing Sun