Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use new HTTPS localhost certificate

I have a problem with HTTPS when I am running (dotnet run) my .NetCore application locally on Windows. It was working till my localhost certificate expired…

I clean up old certificates and generated the new one by

dotnet dev-certs https –clean
dotnet dev-certs https –trust

I’ve verified that everything was added to certmgr (Personal and Trusted certs), but I have the same problem. It is keep trying to use old certificate which expired. I do not know why it is trying to use old “localhost” certificate after clean up certs…

Do you have any idea what should I do?.

Thank you, Błażej

like image 803
Blagalin Avatar asked Jan 21 '26 18:01

Blagalin


1 Answers

If not helps recreate cert by commands:

dotnet dev-certs https ––clean
dotnet dev-certs https ––trust

Clean all private keys from folder:

C:\Users\{User}\AppData\Roaming\ASP.NET\Https
like image 190
Maxim Avatar answered Jan 23 '26 09:01

Maxim