How-to-simply...

Fix NET ERR_CERT_INVALID in ASP.NET Core on Windows

  • 1 dotnet dev-certs https --clean
  • 2 Remove your keys and pem from
    C:\Users\%username%\AppData\Roaming\ASP.NET\https
  • 3 dotnet dev-certs https --trust
  • 4 Close and reopen the browser

References