NPNelson
NPNelson

Reputation: 3110

How to enable SSL for IIS Express in VS2015

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

Answers (5)

Paul
Paul

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.

  1. Open the properties of the project
  2. Select the debug tab on the left
  3. Tic the checkbox for Enable SSL

enter image description here

If yout don't have the above option

Click the project root node in the explorer window, press F4 and adjust the following:

enter image description here

Upvotes: 13

Tom McDonald
Tom McDonald

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.

ADFS SSL Visual Studio

Upvotes: 1

Kevin
Kevin

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

Example

Upvotes: 8

agua from mars
agua from mars

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

Kos
Kos

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.

Enable SSL VS2015

Upvotes: 12

Related Questions