This also applies to Visual Studio 2010.
And there is more to it.
Symptoms:
- A Web (Services) project is configured to run at a specific port, e.g. 10080.
- After a while Visual Studio compains “Unable to launch the Visual Studio Development Server because port ’10080′ is in use”
- The reason is still unclear. It might have something to do with the webdev server crashing.
- Restarting the pc doesn't solve the problem.
- Netstat doen’t show an entry for the port 10080
- Manually startin WebDev.WebServer40.exe at port 10080 works fine.
Since I'd like to start from within Visual Studio, I moved to port 10081, then to 10082, and today to 10083. I’m running out of ports.
Solutions that did not work:
- Restart Visual Studio
- Tweaking Trendmicro security settings (couldn't access them)
- Disabling Forticlient antivirus/firewall
Workaround that DOES work:
- Configuring my project to manually start the server
- Right click the project, choose properties
- Click the tab "Web"
- Pick for start action "Start external program" and point it to Webdev.Webserver40.EXE
(for me: C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.EXE)
- Command line arguments: /port:10080 /path:C:\Solution\Project
- Working directory: C:\Solution\Project
- Under servers check "Use Custom Web Server"
- Do not check any debugger checkbox
Side effect: my project thinks break points are not getting hit. ("no symbols loaded"). Turns out they work like they should.
I hope anybody ever finds a definitive solution, but up until then this workaround does the trick for me.