Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unable to connect to web server 'IIS Express'"

.NET CORE 1.1 application, normally works and runs on localhost:5000. Sometimes I start getting the title error, and then I have to reboot my machine. I think I might have tracked it down somewhat to Docker now using port 5000. So I stopped docker figured that would be it. But I keep getting the same error. Resource monitor shows that port 5000 is in use by pid 4 'System'. I've killed the IIS processes and the port disappears. Then when I run my app again I keep getting 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 some way to recover from this without a reboot?

like image 294
Jason Goemaat Avatar asked May 16 '17 08:05

Jason Goemaat


1 Answers

I was able to get it work doing the following:

  • Close Visual Studio
  • Delete the .vs directory in the solution folder
  • Restart Visual Studio
  • Change project to run on another port and debug it
  • Stop Debugging and change port back to 5000, then restart
like image 114
Jason Goemaat Avatar answered Oct 12 '22 09:10

Jason Goemaat