Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net core web api local https problems

I can not use HTTPS with my web api so I tried running this command:

dotnet dev-certs https --trust

But I got this error :

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.

I also tried to clean and create a new one

dotnet dev-certs https -v
The HTTPS developer certificate was generated successfully.

But still facing the same issue. I can not see localhost certificate in CurrentUser\Personal\Certificates

like image 809
Halit Kalayci Avatar asked Sep 17 '25 13:09

Halit Kalayci


1 Answers

Sometimes this happens if you have multiple Certificates.

  1. Execute certmgr.msc in Run
  2. Clear all localhost certificates
  3. On the commandline execute dotnet dev-certs https -t
  4. You can check the certificate with dotnet dev-certs https --check. if this command returned nothing, every thing is OK.
  5. run your application using dotnet run
like image 116
Alireza Orumand Avatar answered Sep 20 '25 11:09

Alireza Orumand