Sometime we get errors on local machine like This site can't be reached localhost refused to connect
This is because of self signed certificate configuration broken for local IIS Express or you have never configured self signed certificates on this machine ever.
To fix self-signed certificate on the local machine you need to:
--> Close Visual Studio 2017
--> Delete .vs folder from the root location (Don't worry it will be recreated)
--> Run this below command in command prompt(as Administrator):
cd "C:\Program Files (x86)\IIS Express"
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44342/ -UseSelfSigned
--> Run VS2017 as Administrator and execute by F5
Note: https://localhost:44342/ is what is in MVC project settings under build Tab.
No comments:
Post a Comment
Please Give Some Comment