title: TransactionScope with async wcf service
body: <p>I can't get transactionScope to roll back, either because I'm missing something or I'm misunderstanding the purpose of transactionScope.</p>
  
  <p>I have the following method that is making a call to two wcf services:</p>
  
  <pre><code>    public async Task&lt;IHttpActionResult&gt; Put(IEnumerable&lt;string&gt; values)
      {
          using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
          {
              Task task1 = service1.UpdateAsync(values);
  
              Task task2 = service2.UpdateAsync(values);
  
              await Task.WhenAll(task1 , task2);
  
              scope.Complete();
          }
  
          return Ok();
      }
  </code></pre>
  
  <p>Each service operation has the following attributes:</p>
  
  <pre><code> [OperationContract]
   [TransactionFlow(TransactionFlowOption.Allowed)]
   void Update(IEnumerable&lt;string&gt; values);
  </code></pre>
  
  <p>The actual service (same for both)</p>
  
  <pre><code>public void Update(IEnumerable&lt;string&gt; values)
  {
      foreach (string value in values)
      {
          db1Access.Update(value);
      }
  }
  </code></pre>
  
  <p>SqlAccess (This is or own library we are using, basically your bread and butter IDbCommand stuff behind this):</p>
  
  <pre><code>BaseSqlAccess sqlAccess = factory.CreateSqlAccess("stp_update");
  sqlAccess.AddParameter("values", values);
  
  sqlAccess.ExecuteNonQuery();
  </code></pre>
  
  <p>The binding in the contract has the following attributes:</p>
  
  <pre><code>&lt;wsHttpBinding&gt;
      &lt;binding name="WSHttpCommonBinding" transactionFlow="true"&gt;
      &lt;/binding&gt;
  &lt;/wsHttpBinding&gt;
  </code></pre>
  
  <p>API's config that implements the service endpoint:</p>
  
  <pre><code>&lt;bindings&gt;
    &lt;wsHttpBinding&gt;
      &lt;binding name="CommonBindingConfiguration" transactionFlow="true" maxReceivedMessageSize="2000000"/&gt;
    &lt;/wsHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;client&gt;
    &lt;endpoint address="http://localhost:56084/service2.svc" binding="wsHttpBinding" bindingConfiguration="CommonBindingConfiguration" contract="IService1" name="IService1EndPoint"/&gt;
    &lt;endpoint address="http://localhost:56084/service2.svc" binding="wsHttpBinding" bindingConfiguration="CommonBindingConfiguration" contract="IService2" name="IService2EndPoint"/&gt;
  &lt;/client&gt;
  </code></pre>
  
  <p>I was under the impression if I throw an error after the Task.WhenAll it would begin a rollback, I've also tried throwing the error in service2 but service1 still follows through and there is no rollback.</p>
  
  <p>What am I missing here?</p>
  
  <p>A few things to note:</p>
  
  <ul>
  <li>DataAccess is executing Procs</li>
  <li>Each service is connecting to two separate DB's</li>
  </ul>