Click here to Skip to main content
15,867,308 members
Articles / Security
Tip/Trick

Enabling SSL with IIS Express in Visual Studio

Rate me:
Please Sign up or sign in to vote.
4.92/5 (13 votes)
8 Feb 2014CPOL1 min read 183.7K   6   7
Enabling SSL with IIS Express in Visual Studio

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.

Image 1

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.

Image 2

Once the SSL is enabled (SSL Enabled = true); you can find both the URLs available in application browser window.

Image 3

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Hawaii Consulting
France France

Software architect, web performer and mobile programming explorer ...
Wish to launch his own company in the near future.

Professional email : ahmed[at]hawaii.fr

Linkedin | Viadeo




Comments and Discussions

 
QuestionEnabled but my browser does not support sha1 , it supports sha256 Pin
Soumalya Pramanik18-Jun-16 4:01
Soumalya Pramanik18-Jun-16 4:01 
I have enabled the SSL and it can connect in any browser that supports sha1 , but my browser supports sha 256(google chrome) , so What should I do to make the certificate coded in sha256 algorithm?Confused | :confused:
Soumalya Pramanik

QuestionA bit of a problem with testing Pin
mlowry29-Oct-15 4:45
mlowry29-Oct-15 4:45 
QuestionHow to view the Project Properties Pin
Bret Williams13-Aug-15 6:56
Bret Williams13-Aug-15 6:56 
AnswerRe: How to view the Project Properties Pin
BloodBaz27-Nov-19 3:44
BloodBaz27-Nov-19 3:44 
Questionenabled but working? Pin
Member LP19-Mar-14 8:16
Member LP19-Mar-14 8:16 
Answerhelpful Pin
kosiso8-Feb-14 22:29
professionalkosiso8-Feb-14 22:29 
GeneralRe: helpful Pin
Ahmed Bensaid9-Feb-14 1:29
professionalAhmed Bensaid9-Feb-14 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.