Posts
1150
Comments
891
Trackbacks
1
Using TransactionScope : The Transaction has been aborted

This is a pretty generic error message that can pop up.  As always, there are many possible different causes for it, but here’s one.

If you have any nested transactions, and the inner transaction isn’t ‘done properly’, you can get this error message in the parent transaction.

So, in my case, I had a typical using (var scope = new TransactionScope()) section, and was getting this error message when I called scope.Complete().

The reason was because, inside that using statement, I had a call to another method that had its own (var scope = new TransactionScope()) section, and in that inner call, I was not always properly calling scope.Complete().

A bit nasty, but there you go.

posted on Tuesday, June 14, 2011 11:30 PM Print
Comments
Gravatar
# re: Using TransactionScope : The Transaction has been aborted
Lucian Marin
10/4/2011 3:07 PM
I had this problem. I had a few nested scopes and aparentely nothing wrong happend in my methods. After readind your post did some full debbuging and I found a return instead thow exception(my bad indeed). solved it. thx

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 6 and 6 and type the answer here: