title: How do I prevent a timeout error when executing a store procedure using a SqlCommand?
body: <p>I have a C# program which runs a stored procedure.  If I run the stored procedure from Microsoft sql server management studio, it works fine. It does take about 30 seconds to execute.  However, if I try to run the same stored procedure from a C# program, it times out, even though I have set the timeout in the  connection string to 10 minutes.</p>
  
  <pre><code>using (connection1 = new SqlConnection("user id=user_id_goes_here;password=password_goes_here;initial catalog=database_name_goes_here;data source=server_name_goes_here;connection timeout=600))
  </code></pre>
  
  <p>It seem to time out after about 30 seconds, even though I have set it to allow 10 minutes (for testing purposes).</p>