How to fix HTTPS Certificate Error when running ASP.NET Core web app in VSCode

Viewed 1164

I have move to using VSCode instead of VS2019 but noticed this error comes up when I run.. It still works.. I just need to keep clicking to ignore the error. Is there some easy fix for this ?

1 Answers

Follow these steps:

  1. Open terminal
  2. Run dotnet dev-certs https --trust and confirm the dialog
  3. Close VSCode
  4. Close all browser instances

To find more information, take a look at:

You may find the following commands useful:

  • Clear developer certificate: dotnet dev-certs https --clear
  • Generate a developer certificate: dotnet dev-certs https
  • Trust developer certificate: dotnet dev-certs https --trust
Related