Visual Studio 2022 | net::ERR_CERT_INVALID

One of the teething issues a developer will face while using Visual Studio 2022 is related to IIS Express SSL certificate. My primary role as an Oracle developer, developing .Net applications was always a side kick, that complemented the inhouse extensions for Oracle EBS. This time I was trying to upgrade such a project once after getting a new development laptop at work. This project was framed using Visual Studio 2019 community edition years back, however I chose Visual Studio 2022 community edition this time. After the mandatory upgrades, testing failed throwing the error “net::ERR_CERT_INVALID” using Microsoft Chrome browser. This was not the first time I came across this error and somehow, I forgot to document the steps that resolved this issue for me last time.

Few of my Google searches were not landing me on a proper solution, hence I tried Microsoft Copilot this time.

Obviously, my issues were resolved by the steps 1 and 2. Just make sure that Visual Studio is closed while attempting these steps.

Once the repair is over, open “Developer Command Prompt for VS 2022” as administrator. You can do this by pressing the CTRL key while clicking “Developer Command Prompt for VS 2022”

Now, run the first command

Accept the prompt.

Now, run the second command

You should accept to install the certificate. Open Visual Studio now and continue with the debugging that should work as expected this time.

I don’t remember experiencing SSL related issues with Visual Studio 2019, that I used for years.