Introduction
Through this tip, we are going to enable SSL with IIS Express in Visual Studio.
Background
IIS Express is a lightweight and tiny version of IIS for developers to run and test the web sites directly from Visual Studio. I hope by this time you must be using it as your default development
web server as well. Just to quickly recall, IIS Express was introduced
with VS 2010 SP 1, where we used to have both Visual Studio Development Server (WebDev.WebServer) and IIS Express. However with Visual Studio 2013,
IIS Express has been set as a default web server.
Using the Code
There are several
features of IIS express which you can find very useful and be used in a
similar way that we do with IIS. One of the great features of IIS
express is to run your application in both default and SSL mode. You can
achieve this very easily.
To enable the SSL with in IIS Express, you have to just set “SSL Enabled = true” in the project properties window.
By default SSL enabled is set to false with IIS Express; so if
you run your web application first time, you will only be able to find the
default URL and you can access the site over http.
Once the SSL is enabled (SSL Enabled = true);
you can find both the URLs available in application browser window.
Points of Interest
With this, you can access any of the URLs from your browser and run the application in both modes.
Hope this helps.
Please let me know if you have any questions or comments.
History
- 8th February, 2014: Initial version