title: TransactionScope Timeout occurs prematurely?
body: <p>I'm using <code>TransactionScope</code> to do some batch insert and updates. Problem is, I'm getting timeout exceptions on a 30 min long operation even when I set the timeout of the <code>TransactionScope</code> to one hour.</p>
  
  <p>Also after the exception it inserts seemingly random amount of the records of the batch. For example the last operation had 12440 inserts and after the timeout there were 7673 records inserted to the table.</p>
  
  <p>The timeout of the <code>SqlConnection</code> and <code>SqlCommand</code> are both set to <code>int.MaxValue</code>.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, TimeSpan.FromHours(1)))
   {
           try
           {
                  using (db = new DB())
                  {
                  //operations here
                  }
           }
           catch (Exception ex)
           {
                 throw new Exception("DB Error:\r\n\r\n" + ex.Message);
           }
  
           transaction.Complete();
  } // &lt;--- Exception here: Transaction aborted (Inner exception: Timeout)
  </code></pre>