Enabling SSL with IIS Express in Visual Studio 2015
- Select the startup project and press F4 (the function key) this will open the property window.
- To enable the SSL with in IIS Express, you have to just set “SSL Enabled = true” in the project properties.
- Once you change the value, Visual Studio set in automatic the SSL URL, e.g., https://localhost:44301/.
- Copy SSL URL. Go to the Advance properties by pressing Alt+Enter, select the Web tab and set the Project URL with the same value of SSL URL, e.g., https://localhost:44301/.
- Now you have configured the default URL of the web application, we can run the site (F5 or CTRL + F5).PS: The first time you set the secure protocol on IIS Express, you will be prompted to install the certificate for SSL.
Note: If you are getting “IIS Error: cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’”
Please refer this .
Hope this will help !!