How to force Visual Studio to re-create the SSL certificate for a .NET Core Web Application running Kestrel?

I finally figured it out.

For anyone else who runs into this, the steps to fix it are:

  • All localhost certificates must be deleted in certificate manager. They can be found in Personal and Trusted Root
  • The secrets.json file must be deleted. This can be found in \Users\[user]\AppData\Roaming\Microsoft\UserSecrets\
  • In powershell, re-run dotnet dev-certs https --trust to create and install a new one with the prompt to trust

It will work after this again.

Leave a Comment

techhipbettruvabetnorabahisbahis forumuedueduseduedueduseduseduedueduedu