views:

2883

answers:

7

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.

+1  A: 

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.

jdecuyper
You're onto something, the port numbers are different in the notification and the browser. I run NOD32 as my anti-virus; what are the chances this is causing the issue?
Jeff Dalley
Ok, I had the exact same problem at work, I don't remember exactly what the command was, but basically I had to create an exception in NOD32 to prevent this incorrect proxy behavior. Let me know if you can solve it this way.
jdecuyper
Maybe you could first disable NOD32 to see if this the cause of your issue.
jdecuyper
NOD32 was definately the cause of the problem - Disabling it didn't fix it, uninstalling it did however. For curiosity sake I re-installed it and the problem hasn't come back (Yet). If it does I'll look into it further, for now at least I know that was the cause!
Jeff Dalley
+1  A: 

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.

JTew
+1  A: 

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)

+1  A: 

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.

+1  A: 

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.

jl
+1  A: 

Hi Buddys.......

"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.......

Umesh Kumar Singh
A: 

I had a similar problem, i tried everything, path changing in host file, no antivirus is installed, firewall is off. But still i am facing the problem. Kindly help me out of this problem.

Thanks Rafaqat

rafaqat