Question

I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1/Default.aspx (for example), but after about 10-15 seconds it displays a "Connection Interrupted - The connection to the server was reset while the page was loading." Error.

This issue is also present with older ASP.NET C# pages/Web Services I've built in the past, nothing is actually running off the ASP.NET Development server.

I am using: Windows XP Pro SP2, Visual Studio 2008

For reference I have SQL Server 2005 Developer Edition installed as well.

I have tried:

  • Browsing it with IE instead of Mozilla
  • Trying 2.0 framework instead of 3.5
  • Reinstalling Visual Studio 2008

This problem seems so trivial the more I think about it, but I havn't been able to work it out just yet! Appreciate any help on the matter.

Was it helpful?

Solution

When you launch the application, a little info mark appears at the right bottom of your screen telling you that the local web server was started and on wich port. You should compare that port to the one that appears in your browser. If they are different, an anti-virus could be responsible for that problem. Another place to look is your host file. Some software tweak this file and can make your localhost disbehave.

OTHER TIPS

I had the same problem, and when I was about to quit and run away and join a monastry I had an idea to check ELMAH - maybe it had caught it...

Sure enough, ELMAH told me it had caught this:

System.Web.HttpException (0x80004005): Maximum request length exceeded.

and this fixed it:

<system.web>
  <httpRuntime maxRequestLength="65535" />
</system.web>

Good luck, Dave

Something like Fiddler or another proxy like server could cause this issue if local addresses are proxied.

You can check this under Control Panel/Internet Options - Connections Tab, Click LAN Settings down the bottom.

Try adding "127.0.0.1 localhost" before the line reading "::1 localhost" in c:\windows\system32\drivers\etc\hosts

This worked for me (VS2008, Vista Ultimate)

I had a similar problem on Windows 7 RC and Visual Studio 2008 SP1. Changing localhost to 127.0.0.1 helped. Similar to the hosts file solution, but doesn't require the file editing, you just need to change the project startup url.

I've the same problem, just instaled VS 2008 in a Vista Business machine. I have a LAN, but no proxy server and the c:\windows\system32\drivers\etc\hosts" with "127.0.0.1 localhost" are there. but none of my projects work, neither new ones.

"I had a similar problem on Windows 7 RC and Visual Studio 2008 SP1. Changing localhost to 127.0.0.1 helped. Similar to the hosts file solution, but doesn't require the file editing, you just need to change the project startup url."

This solution is working fine.......

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top