Skip to content

Instantly share code, notes, and snippets.

@jennings
Created June 4, 2014 21:20
Show Gist options
  • Save jennings/916c24cd4cc021ddd216 to your computer and use it in GitHub Desktop.
Save jennings/916c24cd4cc021ddd216 to your computer and use it in GitHub Desktop.
How to use a real certificate with IIS Express

Generate a certificate and store it in the local computer's certificate store.

Then, use netsh to assign the certificate to a port and application.

netsh http delete sslcert ipport=<hostname>:<port>
netsh http add sslcert ipport=<hostname>:<port> certhash=<certificate-thumbprint> appid=<appid>

For example:

netsh http delete sslcert ipport=0.0.0.0:44301
netsh http add sslcert ipport=0.0.0.0:44301 certhash=E8C4DF4BD68DB3735E874B68B4F3CAAABF8823AC appid={214124CD-D05B-4309-9AF9-9CAA44B2B74A}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment