TransactionAbortedException in TransactionScope constructor RRS feed

  • Question

  • My program uses two nested TransactionScopes and a bit of DbContext stuff for Entity Framework inside these transaction scopes. This is all as described by other tutorials. Still I get the following exception in the nested TransactionScope constructor:

    System.Transactions.TransactionAbortedException: Die Transaktion wurde abgebrochen.
       bei System.Transactions.TransactionStateAborted.CreateAbortingClone(InternalTransaction tx)
       bei System.Transactions.DependentTransaction..ctor(IsolationLevel isoLevel, InternalTransaction internalTransaction, Boolean blocking)
       bei System.Transactions.Transaction.DependentClone(DependentCloneOption cloneOption)
       bei System.Transactions.TransactionScope.SetCurrent(Transaction newCurrent)
       bei System.Transactions.TransactionScope.PushScope()
       bei System.Transactions.TransactionScope..ctor(TransactionScopeOption scopeOption, TransactionScopeAsyncFlowOption asyncFlowOption)
       bei System.Transactions.TransactionScope..ctor()

    What does that mean? I never cancelled any transaction up until there. This is when talking to SQL Server 2014, I haven't tested other database systems yet. Using Entity Framework 6.1.3 with .NET 4.6.

    Monday, August 24, 2015 3:15 PM


  • Oh, sorry, I don't have that code anymore. TransactionScope is a monster, reversing every database development practice, based on hidden magic, and in the end it failed anyway (there was no transaction effect at all). I've changed my code to more traditional DbTransactions and that works well (as expected) now.

    • Proposed as answer by Youjun Tang Wednesday, September 2, 2015 7:49 AM
    • Marked as answer by Fred BaoModerator Monday, September 7, 2015 10:04 AM
    Tuesday, September 1, 2015 8:06 AM

All replies