2

I am trying to run a C# application configured to use SSL in Visual Studio. When running the application, I am prompted to generate and trust a self-signed certificate that ASP.NET has generated.

Trust ASP.NET Core SSL Certitificate

When accepting, I am greeted with an error stating that there was an issue trusting the certificate.

Failed trusting the certificate

Upon closer inspection, I can see that the certificate was generated successfully in my personal certificates for my Current User, but it was not applied to the Trusted Root Certification Authorities.

Current User Personal Certificates

When trying to manually copy the certificate into the Trusted Root Certification Authorities, I am presented Access is Denied.

Access is denied.

I've battled this and have been unable to pass this roadblock. If anyone has any idea as to why I cannot trust this particular ASP.NET certificate, please share.

phuzi
  • 12,078
  • 3
  • 26
  • 50
  • 2
    Main question is why you can't add the certificate to the Trusted Root Certification Authorities store. In certmgr.msc, select "Certificates - Current User", then in the View menu there is "Options". You can select the "Physical certificate stores". Then you expand Trusted Root Certification Authorities. Normally you should at least have Registry and Local Computer. It is normal you can't import in the Local Computer physical store if you do not have administrator privileges. But you could run Certmgr.msc as administrator and import it. For the Registry, maybe a permission issue ... – Hazrelle Oct 21 '21 at 08:36
  • 3
    Very bizarre. Running as administrator was not enough to copy the cert into the trusted root. But simply enabling "Physical certificate stores" was enough to allow me to paste into the trust root. Thank you very much!! – Kohl Meister Oct 21 '21 at 14:58
  • Glad it helped you :) But I would worry a bit about my computer. Strange that you even don't have access as administrator. If the permissions are broken you may have various issues regarding SSL/TLS. While this is for writing this may be ok. – Hazrelle Oct 21 '21 at 15:10
  • And it's not common to copy/paste a certificate into the store. Generally you import it, longer but maybe safer :) – Hazrelle Oct 21 '21 at 15:12

0 Answers0