Thursday, 14 October 2010

Unable to start asp.net development server because port [port number] is in use

After a debugging session was stopped abruptly in VS.NET 2010, the error "Unable to start asp.net development server because port [port number] is in use" would appear every time I tried to debug or run the web application.

Restarting Cassini and killing all instances, restarting VS.NET and ultimately kicking Windows did not release the port. When I checked manually, the port was not in use but Visual Studio insisted it was. Changing the port used or auto generating the port to be used did not work around this issue.

This is a Silverlight application but the issue does not seem to be Silverlight specific.

The fastest way to fix this problem was to Remove the web application project from the solution and re-Add it.

No comments: