“Unable to launch the IIS Express Web server.” in Visual Studio

前端 未结 27 1536
清酒与你
清酒与你 2021-01-30 00:44

I attempted to run my web service through visual studio. I faced an issue like :

---------------------------
Microsoft Visual Studio
---------------------------
         


        
27条回答
  •  伪装坚强ぢ
    2021-01-30 01:06

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

提交回复
热议问题