none
The transaction manager has disabled its support for remote/network transactions.

    Question

  • Hi, I just started getting this error today on sql azure.  I have a series of queries inside a transaction, and a stack trace that looks like this, starting from where I call from my code.

    [COMException (0x8004d024): The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)]
       System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim) +0
       System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken) +333
    
    [TransactionManagerCommunicationException: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool.]
       System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException) +331003
       System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken) +304615
       System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction tx) +204
       System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx) +427
       System.Transactions.EnlistableStates.Promote(InternalTransaction tx) +26
       System.Transactions.Transaction.Promote() +72
       System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction) +71
       System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) +277
       System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx) +736
       System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction) +150
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +2647
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +89
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6372046
       System.Data.SqlClient.SqlConnection.Open() +300
       System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +67
    
    [EntityException: The underlying provider failed on Open.]
       System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +11109774
       System.Data.EntityClient.EntityConnection.Open() +142
       System.Data.Objects.ObjectContext.EnsureConnection() +97
       System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +66
       System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +47
       System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +271
       System.Linq.Queryable.SingleOrDefault(IQueryable`1 source) +383
       fwf.Utility.Utilities.QueueWeeklyEmail(Person p, String type) in C:\Users\alden\Documents\Visual Studio 2010\Projects\pty1\fwf\Utility\Utilities.cs:34
    What is going on here? This works fine on my development machine. I thought at first I would need to get MDTC running in the cloud, but it looks to be started on my instance.

    EDIT: I found the issue.  There was a condition in the transaction that caused the instantiation of a new DbContext.  Hence when I began transactions on the new DbContext, Sql azure required a distributed transaction.  Moving this query to the same DbContext as the rest of the transaction fixed the issue.


    • Edited by AldenG Thursday, May 31, 2012 2:59 AM Answered
    Thursday, May 31, 2012 2:10 AM

Answers

  • EDIT: I found the issue.  There was a condition in the transaction that caused the instantiation of a new DbContext.  Hence when I began transactions on the new DbContext, Sql azure required a distributed transaction.  Moving this query to the same DbContext as the rest of the transaction fixed the issue.


    Hi,

    I'm glad you found and shared the answer.

    PS: Just marking my reply as answer in order to the thread be marked as answered in the index!



    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful". Best Regards.

    Thursday, May 31, 2012 8:38 AM