Visual Studio 2017 Enable SSL

后端 未结 9 1222
我在风中等你
我在风中等你 2020-12-23 13:45

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

相关标签:
9条回答
  • 2020-12-23 14:14

    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.

    0 讨论(0)
  • 2020-12-23 14:16

    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.

    0 讨论(0)
  • 2020-12-23 14:18

    This is for an Asp.Net Core 2.0:

    1. Open up your Solution Explorer in VS2017.
    2. Doubleclick Properties (yes, it's an object itself too, not just a folder)
    3. Open Debug on the left side
    4. Scroll down and select Enable 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.

    0 讨论(0)
提交回复
热议问题