"Unable to connect to web server" IIS Express "

.NET CORE 1.1 application usually runs and runs on localhost: 5000. Sometimes I start getting a header error and then I have to restart my computer. I guess I could trace it back to Docker a bit, now using port 5000. So I stopped docker, figured it would be like this. But I still get the same error. Resource monitor shows port 5000 is in use by pid 4 'System'. I killed the IIS processes and the port disappeared. Then when I run the application again, I get the same error. I can restart VS (both 2015 and 2017) and use different ports, but I keep getting the error until I reboot.

Is there a way to restore this without rebooting?

+3


source to share


1 answer


I managed to get it to work by doing the following:



  • Close Visual Studio
  • Delete the directory .vs

    in the solution folder
  • Restart Visual Studio
  • Change the project to a different port and debug it
  • Stop debugging and change the port to 5000 and then restart
+14


source







All Articles