title: browser timeouts while asp.net application keeps running
body: <p>I'm encountering a situation where it takes a long time for ASP.NET to generate reply with the web page (more than 2 hours). It due to the codebehind running for a while (very long, slow loop).</p>
  
  <p>Browser (both IE &amp; Firefox) stops waiting for the reply (after about an hour) and gives generic cannot display webpage error (similar to what you would see if you'd try to navige to non-existing server).</p>
  
  <p>At the same time asp.net app keeps going (I can see it in debugger) and eventually completes.</p>
  
  <p>Why does this happen? Are there any settings in web.config to influence this? I'm hoping there's a timeout setting that I'm missing that's causing this.</p>
  
  <p>Maybe a settings in IE or Firefox? But I think they wait while the server is keeping connection alive.  </p>
  
  <p>I'm experiencing this even when I launch app in debug mode (with compilation debug="true") on my local machine from VS (so it's not running on IIS, but on ASP.NET Dev Server).</p>
  
  <p>I know it's bad that it takes so long to generate the page, but it doesn't matter at this stage. Speeding it up would take a lot of extra work and the delay doesn't really matter. This is used internally.</p>
  
  <p>I realize I can redesign around this issue running logic to a background process and getting notified when it's done through AJAX, or pull it to a desktop app or service or whatever. Something along those lines will be done eventually, but that's not what I'm asking about right now.</p>