fiskeboss fiskeboss - 2 months ago 57x
ASP.NET (C#) Question

ASP.NET Core + IIS Express how to setup SSL Certificate

We are running a web API with ASP.NET Core on IIS Express locally. We are using a custom domain name configured in the hosts-file.

This works fine, but we have to manually trust the site in Chrome every now and then, so we would like to set IIS Express up to use our SSL-certificate.

IIS Express is configured in launchSettings.json:

"iisExpress": {
"applicationUrl": "",
"sslPort": 44300

How can we configure IIS Express to use our SSL Certificate?


Install the certificate on the machine, then run in cmd:

"C:\Program Files (x86)\IIS Express\IisExpressAdminCmd.exe" setupSslUrl -url:<port> -CertHash:<Certificate thumbprint>