1

I am trying to launch a IIS Express Server from Visual Studio, but it never launches. After trying to launch it from powershell, I get the error "Failed to register URL "http://localhost:49712/" ... The process cannot access the file because it is being used by another process. (0x80070020)"

So naturally, I want to kill the process using the port. So I use "netstat -aon | find "49712"" in the Windows Command Prompt, but there are no processes using the port.

Does anyone know of anything that could be holding on to the port? I have tried restarting, reinstalling Visual Studio, reinstalling IIS Express, and essentially uninstalling everything else except the operating system. It has happened to me a few weeks ago and persisted for a few days, and then just stopped happening.

Andy Garcia
  • 354
  • 4
  • 13
  • Are you opening multiple solutions containing web apps using same port in those solutions? – vendettamit Jul 03 '18 at 21:51
  • Uninstall/disable your antivirus might help. – Lex Li Jul 04 '18 at 02:16
  • @vendettamit I am not. I am launching a web app using multiple projects using different ports, but even if I launch IIS Express manually to just launch the one on this port, it does not launch, which is how I found the error. – Andy Garcia Jul 05 '18 at 18:23
  • @LexLi Ya tried that the first time this happened, but the port was still "in use". I am currently using Sophos, which is what got uninstalled. We also verified that the port is not blocked by a firewall from this. – Andy Garcia Jul 05 '18 at 18:25
  • You only assume some tough debugging would be needed to drill down to your case, as it seems some weird module might be injected into IIS Express process on your machine. Usually that's done by antivirus software, but of course can be done by any other software on your machine if it attempts to. If you are not capable of doing such debugging yourself, open a support case via http://support.microsoft.com . Again, use a clean Windows machine, and such miserable things would disappear. – Lex Li Jul 05 '18 at 20:05
  • Same story is happening, netstat shows nothing – Alex Sorokoletov Oct 26 '18 at 03:01
  • I still am unsure of the actual cause, but it is intermittent now. I ended up just having to use a different port, which makes things difficult for my use case, but it luckily is still functional. It did however end up dead locking two other ports... I am unsure if after two months they are still always "in use", but the 49712 issue is intermittent. – Andy Garcia Oct 29 '18 at 16:02

0 Answers0