R – Can’t establish connection on local ASP.NET development web server

asp.netconfigurationvisual studio

I am using Visual Studio 2008, and I had an ASP.NET dev configuration working fine, but today when I try to launch any ASP.NET project within the development web server, the browser opens, but I get an error Can't establish a connection to localhost:64428 (port varying at each attempt).

The problem is happening even with a newly created Web Application.

When I try to add a break point the C# code file associated to the default page, I get a warning that The breakpoint will not currently be hit. No symbols have been loaded for this document.

I guess that I have managed to break the configuration of my local ASP.NET development web server. Does anyone know how to fix such a situation?

Best Answer

I found one potential solution here:

http://www.grumpydev.com/2009/03/12/strange-problem-unable-to-connect-to-the-aspnet-webserver-on-localhost/comment-page-1/#comment-73

In summary, edit your hosts file to include:

127.0.0.1 localhost

Not sure how mine got changed or if it even being changed was the cause of the problem, but I'm good to go now since adding the above entry and commenting out the "::1" entry.