After deleting the developer certificate in IIS Express I could recreate a new one as described in this post. This approach worked, even when I needed to run the IisExpressAdminCmd for every port I use. At least, that was how I could fix all problems with SSL and IIS Express on my machine until a few weeks ago. I finally gave up as I got this error:
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
Google showed me this answer on my question what the meaning of this error message is:
Your SSL website may fail to load and display the error. Error code: ssl_error_rx_record_too_long. This usually means the implementation of SSL on your server is not correct. The error is usually caused by a server side problem which the server administrator will need to investigate. (from servertastic.com)
I finally got my IIS Express in a state where all hope was lost. Reinstalling it was less work than expected and a lot faster than attempting to fix yet another TLS problem:
- Close all Visual Studio instances
- Delete localhost certificate in the Certificate Manager tool
- Deinstall IIS Express in Programs and Features
- Reboot
- Download IIS Express from Microsoft
- Install IIS Express
- Start a .Net web application to create a new certificate for localhost
In the weeks since this reinstallation I had no problems with IIS Express and SSL/TLS. Should you run into the same problem I suggest you reinstall your IIS Express without much delay.