Reputation: 3110
I feel like I must be missing something easy, but does anyone know how to enable SSL for IIS Express when using an ASPNET5 web project? The Project Properties Debug screen only shows a port, not a URL ("classic" web projects still allow you to specific https in the url)
Upvotes: 16
Views: 16761
Reputation: 12440
You do this in a vNEXT project almost exactly the same as prior projects. Microsoft just moved the settings to the debug
tab of the project properties.
debug
tab on the leftEnable SSL
Click the project root node in the explorer window, press F4
and adjust the following:
Upvotes: 13
Reputation: 1892
None of the solutions above apply if you are doing .Net 4.5 MVC project with "on premise", aka, ADFS authentication. If so, you won't see a 'debug' tab (see image below). You won't see an "Enable SSL" toggle box. Everything is done automatically by the IDE as long as you select a port in the acceptable range. I used the port 44300 and VS configured the /.vs/config/applicationhost.config file automatically (see below). I think VS might automatically setup SSL with the other authentication types (OAuth, etc.), but I haven't tested it.
Upvotes: 1
Reputation: 2404
Click on the project and press F4, it will show the same properties list as previous visual studio versions where you can set SSL to true.
It will look like this in VS 2015
Upvotes: 8
Reputation: 17424
Edit your applicationhost.config
in [SOLUTION_DIR]\.vs\config
for exemple in the sites section :
<site name="YOUR SITE NAME" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="YOUR SITE PATH" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:localhost" />
<binding protocol="https" bindingInformation="*:44300:localhost" />
</bindings>
</site>
Upvotes: 14
Reputation: 567
This can be done simply if you click on the project in the Solution Explorer the open the Properties and set the SSL Enabled to True.
Upvotes: 12