Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

like image 647
NPNelson Avatar asked Mar 09 '15 00:03

NPNelson


People also ask

How do I use https with IIS Express?

To enable the SSL with in IIS Express, you have to just set “SSL Enabled = true” in the project properties window. With this; you can access any of the URL from your browser and run the application. Hope this helps.

How do I enable SSL for a .NET project in Visual Studio?

Start Visual Studio 2019 and select Create a new project. In the Create a new project dialog, select ASP.NET Web Application (. NET Framework) > Next. In the Configure your new project dialog, enter SSLSample for Project name.

How do I enable IIS Express in Visual Studio 2017?

Select the ASP.NET Core project in Visual Studio Solution Explorer and click the Properties icon, or press Alt+Enter, or right-click and choose Properties. Select the Debug tab. In the Properties pane, next to Profile, For IIS Express, select IIS Express from the dropdown.


3 Answers

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>
like image 62
agua from mars Avatar answered Oct 08 '22 04:10

agua from mars


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

like image 31
Paul Avatar answered Oct 08 '22 04:10

Paul


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

like image 40
Kos Avatar answered Oct 08 '22 04:10

Kos