Skip to content

Instantly share code, notes, and snippets.

@ddieppa
Last active June 9, 2022 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddieppa/980714deb868da95f9e6aabc81524243 to your computer and use it in GitHub Desktop.
Save ddieppa/980714deb868da95f9e6aabc81524243 to your computer and use it in GitHub Desktop.
Certificate Error when running a project (Jetbrains Rider )

Certificate Not Found and start the web application fails

Issue found

This is the first error got:

2022-05-20 12_38_30-Imcdi Web Api Orders – Program cs  Debugger

after that, checking the console, there is a more in detail error, and even a link on where to search for the possible solution:

2022-05-20 11_14_12-Imcdi Web Api Orders – C__Users_ddieppa_AppData_Roaming_JetBrains_Rider2022 1_re

Solution

The first try is to follow the first suggestion, which is run this:

 dotnet dev-certs https --trust

in the terminal will get this message with the subsequent popup (check the image)

Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate.
The HTTPS developer certificate was generated successfully.

2022-05-20 11_13_46-Security Warning

This is a solution that in much of the cases works. But what really works for me in some cases is to clear the certificates, and reinstall them:

dotnet dev-certs https --clean

This will fire up a popup per certificate installed asking if you want to uninstall it:

2022-05-20 13_21_43-Root Certificate Store

and in terminal we get this:

Cleaning HTTPS development certificates from the machine. A prompt might get displayed to confirm the removal of some of the certificates.
HTTPS development certificates successfully removed from the machine.

After deleting all certificates, run the command in the first solution, click yes in the popup, and now should be good to go.

References

Enforce HTTPS in ASP.NET Core

‎‎​

published: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment