7

I'm having trouble in that running my brand new ASP.NET Core app in that it fails to load the website when I run the debugger (see screenshot at the bottom of the question).

I have a hunch this is because of an issue with the certificate so I tried to trust the certificate with the following command:

dotnet dev-certs https --trust

It errors:

PM> dotnet dev-certs https --trust
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.
There was an error trusting HTTPS developer certificate.
PM> dotnet dev-certs https --check
A valid certificate was found.
PM>

There's a valid certificate but checking certificates per this answer, I don't see the certificate in Personal/Certificates or in Trusted Root Certification Authorities/Certificates either.

I'm a little stumped on a resolution; this affects all my Core applications so I can't get any development done.

Why don't I have a certificate there and how can I rectify this?

enter image description here

4
  • 4
    Try dotnet dev-certs https -v for list the certificates. Commented Dec 28, 2019 at 23:52
  • Did you see the popup window? Commented Dec 31, 2019 at 2:40
  • @Rena I did once... It doesn't appear anymore Commented Jan 6, 2020 at 12:30
  • Have you tried running the terminal in admin mode? Commented Sep 17, 2020 at 6:35

1 Answer 1

1

Sometimes you have to remove "old" certificates - check if you have more than one certificate installed (dotnet dev-certs https -v). If this is the case the following steps helped in my case.

  • Finish Visual Studio
  • Remove all certificates by calling dotnet dev-certs https --clean (command line admin mode)
  • Create a new certificate by calling dotnet dev-certs https --trust
  • Start Visual Studio again
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.