title: Linked server was unable to begin a distributed transaction when query is inside a TransactionScope
body: <p>I have a query that involves a Linked server. The query runs fine in SSMS and when wrapped around in C# using Dapper</p>
  
  <pre><code> var conn = GetOpenConnection(connInitializer);
   return query(conn);
  </code></pre>
  
  <p>produces expected result. However, when I put the code inside a <a href="http://msdn.microsoft.com/en-ca/library/system.transactions.transactionscope.aspx" rel="nofollow">TransactionScope</a>,</p>
  
  <pre><code>using (var trans = new TransactionScope())
  {
       var conn = GetOpenConnection(connInitializer);
       var returnValue = query(conn);
       trans.Complete();
       return returnValue;
  }
  </code></pre>
  
  <p>I got an Error: </p>
  
  <p>"The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server xxx  was unable to begin a distributed transaction."</p>
  
  <p>Should I modify some SQL Sever configuration to make this work?</p>