Is there a way to access Visual Studio's built-in ASP.NET Development Server over HTTPS?
-
2See answer from @Guru Kara - the "marked answer" is out of date – Rob Sep 05 '12 at 13:23
-
8I updated the accepted answer – Shawn Miller Mar 12 '14 at 19:34
-
Related: [the port must fall in the range of 44300-44399](https://stackoverflow.com/a/46832843/3002584). – OfirD Oct 28 '21 at 19:15
4 Answers
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.
Next
Then you will get this
Working with SSL at Development Time is easier with IISExpress
-
7This answer should be bumped up, the accepted answer is very out of date. I successfully used the methods in the linked article to get SSL running via VisualStudio 2010 and IIS Express – Tom Wayson Mar 03 '12 at 20:57
-
3Then just don't forget to use the SSL URL from that properties window, because if you didn't change it, next time you start debugging it'll still use the non-SSL URL (obvious, but easy to overlook..) – BornToCode Aug 06 '14 at 13:21
-
-
This does not appear to work with VS2017. IISExpress should read the applicationhost.config in the /.vs/config/ folder of the solution. Anyone know the secret to make this work? – MC9000 Aug 24 '17 at 19:22
-
It sort of works for me (VS 2017 Community). When I debug I have to manually copy/paste the SSL URL into the browser...just clicking the debug button in the IDE gets me to the non-SSL version. – John Riehl Nov 26 '17 at 18:54
-
If you get the wrong properties page which doesn't look like the one above, right click on a project file in Solution Explorer, choose Properties to bring up the Properties panel, the select the web project and go back to the Properties window. – SharpC Nov 07 '19 at 13:08
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
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.

- 172,459
- 74
- 246
- 311
-
1There's no reason to use the stupid Built-in VS web server. Why use that when you're supposed to use IIS in the first place. Get to know IIS, stop saying it's simply too hard and too much work to just use the Create Virtual Directory button in VS which makes it completely easy for you to create one in IIS. And then get to know IIS. It's time developers stop being afraid of it. Get to know App Pools, etc. Otherwise I've seen that most devs who use the built-in server are clueless when it comes to IIS. Not good for your career if you're a developer. Couple more steps to debug, so what. – PositiveGuy Jan 09 '12 at 03:45
-
3
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

- 20,853
- 18
- 75
- 116
-
1The link is no more accessible but you can get it through http://web.archive.org/web/20080123212335/http://www.wilcob.com/Wilco/Toolbox/WebDevWebServer2.aspx – labilbe Jul 06 '09 at 03:17
-
1
-
Thanks a lot for this never knew there was a HttpListener class you reshaped my world! – Peter Dec 13 '11 at 07:33
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

- 173
- 1
- 9
-
1
-
-
6"DEBUG" section in the project properties exists for .NET Core WebApplications. For .NET Framework WebApplication - select the web-project, hit F4 (to show the Properties window) - there is a property "Enable SSL" – Sergey S Jul 19 '18 at 07:35
-
Thanks Sergey. I couldn't find that since it doesn't show in the project settings page. Only underneath the solution explorer when you press F4! – Norbert Norbertson Mar 04 '20 at 10:00