I was trying to run for the first time my localhost from Visual Studio 2019 and Windows asked me:
I accidentally pressed NO, so now I can’t see my site.
I checked different suggestions offered here, in stack overflow, but didn’t work.
I tried going to Add/Remove Programs and choosing the “Repair” option on IIS Express.
cd C:Program Files (x86)IIS Express
IisExpressAdminCmd.exe setupsslUrl -url:urlToYourSite -UseSelfSigned
None of them worked.
Hope anyone can give me a hand.
I have deleted both, IIS Express 10 and Visual Studio and reinstall and that fixed the issue.
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
I did a lot of tests to try to restore your problem, but all failed. Even if I click no every time like you do, it will still pop up the next time I run it again. When it finally no longer pops up, the application can still run, but with http instead of https. Fortunately, I finally reproduced your problem and found the following solution.
- In control panel->Uninstall or change a program, make IIS express repair. If repair doesn’t work. Just uninstall it and install it again.
- Open Win+R ->enter %userprofile% -> Documents ->IIS Express, then delete all folders. Open your project in visual studio. Right click solution and clean it.
Both of these method worked while I tested. You can try them. If them still useless, please re-install visual studio.