Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What could cause "Connection Interrupted" on LocalHost when debugging in ASP.NET

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.

like image 679
Jeff Dalley Avatar asked Dec 06 '22 07:12

Jeff Dalley


2 Answers

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

like image 61
JollySwagman Avatar answered Dec 07 '22 21:12

JollySwagman


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.

like image 31
jdecuyper Avatar answered Dec 07 '22 19:12

jdecuyper