I have IIS Express running a .Net Core web application.

Chrome is able to browse the HTTPS version fine, and until recently so was Firefox. Suddenly I'm getting this error:

Secure Connection Failed

An error occurred during a connection to localhost:44358. Certificate key usage inadequate for attempted operation. Error code: SEC_ERROR_INADEQUATE_KEY_USAGE

And unlike the error for a self-signed certificate, there is no way for me to accept the certificate or "Continue Anyway".

I have tried:

  • Regenerating Firefox's certificate store (deleting cert9.db and cert8.db)
  • Repairing IISExpress.exe
  • Uninstalling and re-installing IISExpress.exe
  • Updating Visual Studio (2019)

Visual Studio generates its own CA and installs it into the Windows Certificate store for web development. You can configure Firefox to import CAs from the Windows Certificate Store by enabling the ImportEnterpriseRoots setting in Firefox.

Do the following to enable use of the Windows Certificate Store by Firefox:

  1. Open Firefox
  2. Navigate to "about:config"
  3. Search for "ImportEnterpriseRoots"
  4. Add it, setting it to true
  5. Restart Firefox

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.