I attempted to run my web service through visual studio. I faced an issue like :
---------------------------
Microsoft Visual Studio
---------------------------
Having just wasted half a day trying to fix this same issue, I felt I should add the solution which eventually worked for me.
TL;DR If netstat
indicates that the problematic isn't in use, still try a few others in a totally different range
I've run into this problem before but usually find restarting visual studio, changing ports (increment by 1) or rebooting do the trick. However on this occasion none of this helped, and netstat
wasn't finding a conflicting process. I even reinstalled IIS and visual studio and removed several other programs which I suspected could be interfering. It seemed as though IIS was trying to launch multiple instances of the same site.
Eventually I tried running netstat
without findstr
. I visually scanned the list of active ports and noticed that although the ones I had tried were not listed, there were a few processes using ports in a similar range. So instead I looked for a range which was free, picked a port number and that seems to now be working.
I'd love to hear if anybody can explain why this might have worked?