ASP.NET Core HTTPS development certificate on Windows

Introduction

The .NET Core SDK includes an HTTPS development certificate. We can use it to develop locally with ASP.NET Core under HTTPS, SSL, and Self-Signed Certs. The HTTPS development certificate is installed to the local user certificate store after installing the .NET Core SDK. All we need to do to make it trusted.

Trust the certificate

To trust the certificate follow these steps:

Run this command using command prompt. This is a one-time step:

dotnet dev-certs https --trust

Copy your local Certificate thumbprint using certmgr:

vs-wasm

vs-wasm

Run this command for each URL:

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

To set up on Linux read here

comments powered by Disqus