在调用transactionScope.Compete()之后仍然有一个TransactionAbortedException

时间:2019-01-07 10:36:21

标签: c# transactions

在使用(transactionScope)块结束时获取transactionAbortedException。之所以调用transactionScope.Complete(),为什么我仍然会收到此异常。

using (var scope = new TransactionScope(TransactionScopeOption.Required, CreateTransactionOption(10)))
{
    // Distributed actions about databases.
    status = SafeAction(realAction).Status;
    scope.Complete();
    return status;
}

innerException是:

SqlException: Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.

0 个答案:

没有答案