The MSDTC transaction manager was unable to pull the transaction from the source transaction manager

1

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)

Logs collected from application server

time=12/18/2018-15:58:08.204 seq=115 eventid=TRACING_STARTED
time=12/18/2018-15:58:36.343 seq=116 eventid=TRANSACTION_ABORTING
time=12/18/2018-15:58:36.343 seq=117 eventid=TRANSACTION_ABORTED
time=12/18/2018-15:58:58.705 seq=118 eventid=TRACING_STOPPED

Logs collected from database server (SQL Server)

time=12/18/2018-15:58:30.302 seq=386 eventid=TRANSACTION_BEGUN
time=12/18/2018-15:58:30.302 seq=387 eventid=RM_ENLISTED_IN_TRANSACTION
time=12/18/2018-15:58:36.349 seq=388 eventid=RECEIVED_ABORT_REQUEST_FROM_BEGINNER
time=12/18/2018-15:58:36.349 seq=389 eventid=TRANSACTION_ABORTING
time=12/18/2018-15:58:36.349 seq=390 eventid=RM_ISSUED_ABORT
time=12/18/2018-15:58:36.349 seq=391 eventid=RM_ACKNOWLEDGED_ABORT
time=12/18/2018-15:58:36.349 seq=392 eventid=TRANSACTION_ABORTED

Which show the two machines were able to communicate with each other, a transaction was started but then application sends a message to abort the transaction.

It happens intermittently, could anyone let me know what may cause an application to abort the transaction?

The code block causing this exception is of the given form

using (TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.RequiresNew, new TransactionOptions() { IsolationLevel = IsolationLevel.ReadUncommitted }))
{
    // Data insertion
    // DbContext.SaveChanges()

    // Data update
    // DbContext.SaveChanges()

    transactionScope.Complete();
}
sql-server
.net-framework
c#
mvc
asked on Super User Feb 5, 2019 by Abdul Waheed Khan • edited Feb 5, 2019 by angelofdev

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0