title: Increasing timeout for LINQ to SQL stored procedure call
body: <p>I call a stored procedure via Linq-to-SQL. This stored procedure simply processes data that I've already inserted into another table. On large data sets, I get a timeout exception:</p>
  
  <pre><code>"Timeout expired. The timeout period elapsed prior to completion of the operation
   or the server is not responding."
  </code></pre>
  
  <p>I can't do anything to speed the stored procedure up -- it's just moving data from one table to another. I don't particularly want to increase the timeout in the database connection string -- this is the only thing that takes a long time.</p>
  
  <p>This isn't a web app; the stored procedure is called from a background thread in a normal Windows service. The background thread is kicked off by a WCF call, and the client periodically polls for the result of the background thread.</p>
  
  <p>Unfortunately, the stored procedure takes too long, and the <code>GetDataContext().spRunStoredProcedure()</code> call throws a <code>TimeoutException</code>, even though the stored procedure appears to be running fine.</p>
  
  <p>Can I increase the timeout just for this stored procedure call? Or is there a way to get the stored procedure to return "I'm not dead yet" to keep the connection from timing out?</p>