I am trying to run ASP MVC application with SSL mode set to true and whenever i run the application, i get prompt to trust the IIS Express SSL certificate. Upon clicking Yes
Note: Adding the OP's solution from the question as an answer.
This is what worked for me. deleted all localhost certificates. ran repair IIS Express in Add/Remove Programs. Copy and pasted localhost certificate from Personal/Certificate to Trusted Root Certificates and it didn't complain anymore.
Repairing/reinstalling IIS Express does not appear to actually fix this issue (as of IIS Express 10), the real solution is to add the localhost certificate to Trusted Rood Certificates.
Full details for how to do this is covered by this blog post: https://blogs.iis.net/robert_mcmurray/how-to-trust-the-iis-express-self-signed-certificate
In summary,
Here is another simple step by step solution in case the answers provided are not clear for you.
Step 1:
Go to Windows Start and type Certificates
, then click on Manage computer certificates
. This would open the certificate manager window.
Step 2:
Now click on the arrow on >Personal
folder, then click on the Certificates
folder. Now select and Delete all certificates in the folder.