How do you enable SSL for a project in Visual Studio 2017?
In VS15, I could select Project -> Properties -> Debug -> Enable SSL. This option is not available in VS20
Ports are locked down in IIS Express so that it doesn't have to be run as Administrator...
Valid Ports are 44300 - 44399
Check out the Dev Community article https://developercommunity.visualstudio.com/content/problem/39430/changing-port-number-in-a-web-project-does-not-imm.html
You can edit launchSettings.json, but the ssl ports must fall in this range.
In Solution Explorer right click on your website name and select "Properties Window", or simply hit F4. Under the Developer Web Server section change SSL Enabled from False to True.
This is for an Asp.Net Core 2.0:
Properties
(yes, it's an object itself too, not just a folder)Debug
on the left sideEnable SSL
If it's already enabled, open up launchSettings.json
(unfold Properties
) and set "sslPort"
to 0
, then do the steps again.
VS2017 should now ask you if you want to add an SSL certificate (something it doesn't do if you changed launchSettings.json
on your own) and it'll set a port for you.