Monday, January 24, 2011

Unable to connect to asp.net development server


I got this error after updating Microsoft Visual Studio 2008 Service Pack 1 (which took much longer than expected - close to two hours):

WebDev.WebServer.exe has stopped working
Unable to connect to the ASP.NET Development Server

As usual, this appeared to be a problem many people had, under many different scenarios, with many different solutions. The following solution is the solution that worked for me:

Delete the web project from the solution, rename the folder where the website is stored and then re-add the project to the solution as an existing website.

This is fine on my local laptop, but would probably be a bit more disconcerting in Visual Source Safe.

So my best guess is Visual Studio stores information about a web site somewhere.  If you don't perform the folder rename, when you add the web site back in you'll see the original, dynamic port settings.  It appears renaming forces a new port.

I don't know where this information is stored.  I can't seem to find anything in the registry, and deleting the temporary asp.net files didn't have any affect.

Although renaming the folder worked, I also did this:

The host file at %\Windows\System32\drivers\etc\hosts may have an incorrect entry. This line...

::1 localhost

was changed to...

:::1 localhost

That's three colons - not two.

I didn't experiment any further and have just moved on.


No comments:

Post a Comment