6

.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?

Jason Goemaat
  • 28,692
  • 15
  • 86
  • 113
  • I assume this is a .NET Core 1.1 app. **Never say .NET 1.1 as that means .NET Framework 1.1 which is end of life**. – Lex Li May 16 '17 at 17:18

3 Answers3

27

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
Jason Goemaat
  • 28,692
  • 15
  • 86
  • 113
0

In the Project properties, try changing the port number to something different:

enter image description here

theITvideos
  • 1,462
  • 2
  • 18
  • 29
0

After tried many options. Finally I have restarted my machine and it works.

prisan
  • 1,251
  • 12
  • 9