ASP.Net connection keep alive for long running server-side task
<p>I have an ASP.Net C# web application, running on IIS, that I'm supporting which involves generation of word documents.  Some of these word documents take a very long time (i.e. upwards of 20-30 minutes) to generate.  What I notice while testing on my dev server is that the server closes the connection long before the process completes, the server-side ASP.Net code itself enters a loop and updates the status of a boolean value when the word doc generation completes.  </p>

<p>My workaround for this is to keep the connection alive by implementing a dynamically animated wait screen ( using jquery and ajax) on the client-side that's updated by a repeated asynchronous AJAX call to the server that checks on the status of the operation from a server-side web method.  I'm asking about that piece in another <a href="http://stackoverflow.com/questions/9660819/delay-between-repeated-ajax-call-to-a-web-method">question</a>.</p>

<p>Is the solution I'm looking at implementing the best approach to this problem?  Are there more efficient or common methods for keeping the connection alive during a long running server-side operation?  Any help or insight is appreciated, thanks.</p>

<p>UPDATE:</p>

<p>I tried Brian's suggestion, unfortunately I still get the same error from Chrome that no data is being sent from the server and the entirety of the error is as follows:</p>

<blockquote>
  <p>No data received Unable to load the webpage because the server sent no
  data. </p>
  
  <p>Here are some suggestions: Reload this webpage later. </p>
  
  <p>Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection
  without sending any data.</p>
</blockquote>

<p>I'll try again by setting the connection timeout in the advanced website settings as described and increasing the connection idle setting.</p>
