title: MVC 3 : The MSDTC transaction manager was unable to pull the transaction from the source
body: <p>I am using MVC 3 with Entities, now I have used the below line of codes from my controller</p>
  <pre><code>        using (var scope = new TransactionScope())
          {
              _myRepository.DeleteFM1(id);
              _myRepository.DeleteFM2(id, name);
              scope.Complete();
          }
  </code></pre>
  <p>and inside my <strong>DeleteFM2</strong> method which happens to be my method defined in the Entity class is as follows :</p>
  <pre><code>    public void DeleteFM2(int id, string name)
      {
          var data= _repositoryMD.Fetch().Where(mColl =&gt; mColl.Col1 == id);
  
          if (data!= null)
          {
                  //insert here is giving some error MSDTC error !
                  // here I prepare a message using the '**data**'
                  _repositoryHistory.Insert(name, message, &quot;FM2&quot;, &quot;Delete&quot;, dateTime);
  
  
                  _repositoryMD.Attach(data);
                  _repositoryMD.Delete(data);
                  _repositoryMD.SaveChanges();
              }
          }
      }
  </code></pre>
  <p>and I have a seperate class where I have defined the Insert method as</p>
  <pre><code>   public bool Insert(string realName, string logMessage, string tableName, string changeType, DateTime dateTime)
      {
          var history = new History
          {
              ModifiedBy = realName,
              ChangeType = changeType,
              DateModified = dateTime,
              LogMessage = logMessage,
              TableName = tableName
          };
  
          _repositoryHistory.Add(history);
          _repositoryHistory.SaveChanges();
  
          return true;
      }
  </code></pre>
  <p>After inserting this line of code in the above method DeleteFM2</p>
  <pre><code>      _repositoryHistory.Insert(name, message, &quot;FM2&quot;, &quot;Delete&quot;, dateTime);
  </code></pre>
  <p>I am getting this error, without this line my code works just fine, I have used this line in all of my other methods too even where I there I had used Transaction Scope, but I still dont seem to understand the problem here. Please help. Thanks</p>
  <p><strong>The underlying provider failed on Open.</strong></p>
  <blockquote>
  <p>System.Transactions.TransactionManagerCommunicationException:
  Communication with the underlying transaction manager has failed. ---&gt;
  System.Runtime.InteropServices.COMException: The MSDTC transaction
  manager was unable to pull the transaction from the source transaction
  manager due to communication problems. Possible causes are: a firewall
  is present and it doesn't have an exception for the MSDTC process, the
  two machines cannot find each other by their NetBIOS names, or the
  support for network transactions is not enabled for one of the two
  transaction managers. (Exception from HRESULT: 0x8004D02B) at
  System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32
  propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier,
  Guid&amp; transactionIdentifier, OletxTransactionIsolationLevel&amp;
  isolationLevel, ITransactionShim&amp; transactionShim) at
  System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[]
  propagationToken) --- End of inner exception stack trace --- at
  System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[]
  propagationToken) at
  System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction
  tx) at
  System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction
  tx) at
  System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
  at System.Transactions.Transaction.Promote() at
  System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction
  transaction) at
  System.Transactions.TransactionInterop.GetExportCookie(Transaction
  transaction, Byte[] whereabouts) at
  System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction
  transaction, Byte[] whereAbouts) at
  System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction
  tx) at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction
  tx) at
  System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction
  transaction) at
  System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction
  transaction) at
  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
  owningObject) at
  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
  owningConnection) at
  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
  outerConnection, DbConnectionFactory connectionFactory) at
  System.Data.SqlClient.SqlConnection.Open() at
  System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
  openCondition, DbConnection storeConnectionToOpen, DbConnection
  originalConnection, String exceptionCode, String attemptedOperation,
  Boolean&amp; closeStoreConnectionOnFailure)</p>
  </blockquote>
  <p><img src="https://i.stack.imgur.com/PRS2o.png" alt="My FireWall settings" /></p>
  <p>My FireWall settings</p>