HTTPS with Visual Studio's built-in ASP.NET Development Server

asp.netVisual StudioVisual Studio-2008

asp.net Problem Overview


Is there a way to access Visual Studio's built-in ASP.NET Development Server over HTTPS?

asp.net Solutions


Solution 1 - asp.net

As of now we can use IIS Express to develop and test in SSL. Here is a complete article explaning how to use IIS Express and Visual Studion 2010 to develop websites in SSL.

enter image description here

Next

enter image description here

Then you will get this

enter image description here

Working with SSL at Development Time is easier with IISExpress

Introducing IIS Express

Solution 2 - asp.net

Cassini does not support HTTPS.

However, you can use IIS to do this, if your using IIS 5.1, download the MS IIS toolpack for IIS 6.0, it comes with a tool to create self signed SSL certificates. This works on IIS 5.1

http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en

The one tool you need (SelfSSL.exe) works just fine with IIS 5.1. Unfortunately, it comes bundled with a bunch of other stuff.

Steps:

  • Install the IIS Tools File. If you want, you can click Custom and tell it to only install SelfSSL.
  • Activate the site in IIS that you want to install a SSL certificate too.
  • Go to Start / Programs / IIS Resources / SelfSSL
  • This will launch a command prompt in the SelfSSL directory.
  • Using the provided help, run SelfSSL. The command I used was: selfssl.exe /N:cn=[MACHINENAME] /K:1024 /V:90 /S:5 /P:443
  • The /S switch indicates which site to install the certificate. You can figure out the number by looking at your sites in IIS and counting (Starting at 1 for the first site, not 0), to the site you want.
  • Once this has ran, browse to your localhost over HTTPS
  • You should receive an error message stating that this certificate is from a untrusted source. You can either add your machinename to the browsers “Trusted Authorities” list, or you can tell the browser to ignore this.

At this point, you will be able to run your localhost over HTTPS.

Solution 3 - asp.net

Wilco Bauwer wrote a webdev server that will support https. He is one of the developers that worked on cassini visual studio 2005 built in web server. WebDev.WebServer2

Solution 4 - asp.net

Select the project-file in the Solution Explorer: for example: "WebApplication1".

With pressing ALT+ENTER you enter the project-properties.

Select "DEBUG" on the left side.

Here you can select "Enable SSL".

Then you can start your project with IIS Express normally and it will start using SSL, the new Port will be 44301

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShawn MillerView Question on Stackoverflow
Solution 1 - asp.netGuru KaraView Answer on Stackoverflow
Solution 2 - asp.netFlySwatView Answer on Stackoverflow
Solution 3 - asp.netAaron FischerView Answer on Stackoverflow
Solution 4 - asp.netMrzJklView Answer on Stackoverflow