Visual Studio 2017 gives 'Adding the Certificate to The Trusted Root Certificates store failed with the following Errror'

后端 未结 8 1744
抹茶落季
抹茶落季 2020-12-24 10:50

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

相关标签:
8条回答
  • 2020-12-24 11:48

    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,

    • Open the certificate manager via "manage computer certificates" in control panel or by running certlm in a cmd prompt
    • Under Personal>Certificates export the localhost cert and save it to disk
      • don't export the private key! Just export the public key.
    • Under Trusted Root Certification Authorities, right click on Certificates and import the cert you just exported
    0 讨论(0)
  • 2020-12-24 11:54

    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.

    0 讨论(0)
提交回复
热议问题