Create new Local Dev Certificate + IIS Configuration

Run PowerShell in Administrator Mode

New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation cert:\LocalMachine\My

The line of code will automatically generate a certificate in the cert manager under personal.
You can access cert manager using “Run” -> “certmgr.msc”

Add certificate to Trusted CA

Right click the certificate in certmgr and export it to somewhere you can find in “.cer”

Once exported, double click the exported “.cer” and install the certificate in “LocalMachine”.

Configure for IIS

Change website binding type in IIS to “https” and select newly created certificate.

Configure Chrome to accept invalid localhost Certificates

Go to
chrome://flags/#allow-insecure-localhost

Enable the “Allow invalid certificates for resources loaded from localhost” and relaunch chrome.

Done

Leave a Reply

Your email address will not be published. Required fields are marked *