Denis Jakus

making tech less cryptic

CTO x Unique People

CTO Note

How to fix the IISExpress SSL certification issue1 min read

22 January 2021 .NET

Let’s continue with DotNet stuff.

One of the problems I’ve encountered when dealing with IISExpress and using Visual Studio was when I used SSL for application.

If you are working in a team of developers, you probably agreed upon a valid port number for SSL. 

In my case it was port number 5001

Since I’m the only one using Visual Studio 2019 for development, I’ve encountered some issues regarding running my backend application on an agreed port number.

So, when I tried to run the application I did get an error: “ERR_CONNECTION_RESET”.

Ofcourse, my app on the agreed port number didn’t work at all.

I was becoming a little bit frustrated. And asked myself what’s going on!?

First thing that was on my mind was configuring Properties and enabling “Enable SSL” checkbox.

Well, that didn’t help.

After googling around, I found out that IISExpress has a default SSL port enabled in a range between 44300-44398.

No matter how you set-up SSL in Properties or in the appsetting.json file, it won’t have any effect.
You will constantly be getting the “ERR_CONNECTION_RESET” error.


Although I’ve tried different solutions for this problem, none of them worked.

The only viable solution which helped me solving this issue was by running in a command prompt one-liner:

C:\Program Files\IIS Express>IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:5001/ -UseSelfSigned

This overrides ISSExpress default SSL range ports and sets HTTPS to a 5001 port which is signed by myself.

This way I’ve solved my problem with SSL certificates.


If you want to buy SSL certificates, use this affiliate link:

Related Posts
  • Geoff Hughes 11:08 13 July 2021 Reply

    You have saved me hours of false leads and frustration!

Write a comment
Exit mobile version