I have a fresh install of Visual Studio Community 2019 on a new computer. I started a web app project, ran it for the first time, and then when prompted to accept the self-signed certificate I somehow managed to click "Do Not Ask Again" and "No".
At this point, when running the web app, I get a ERR_CONNECTION_RESET and can't connect to anything. I've tried deleting and recreating the certificate using advice listed here: Re-Installing Visual Studio 2017 Localhost Certificate, as well as reinstalling VS entirely, but neither worked.
To be clear, I messed up, not Visual Studio. As far as I can tell, there's nothing particular about my set up or environment, and I've built web apps in Visual Studio before, I just clicked the wrong things this time and am trying to undo that without factory resetting this entire PC.
Does anyone have any idea how I can trigger that original prompt in Visual Studio and get a properly signed certificate to run a web application?
If anyone has this very specific issue again, I'll post what I did to fix it (from this forum thread: https://developercommunity.visualstudio.com/t/cant-debug-aspnet-applications-err-connection-rese/1239592?viewtype=all)
1. In VS: Tools > Command Line > Developer Command Prompt, run
Edit: not needed, thanks lex-li!devenv /resetsettings
(this will also reset some customization settings)
netsh http show sslcert ipport=0.0.0.0:44390
in the command prompt (ensure the Certificate Hash field is present).