Groups | Blog | Home
all groups > dotnet ado.net > may 2007 >

dotnet ado.net : Transaction problems


4nd3r5 NO[at]SPAM gmail.com
5/29/2007 1:35:32 AM
Hi All

I've got a problem with some transactionhandling. I have a dual server
setup: one webserver and one databaseserver. Because of the dual
server setup i have configured MSDTC (distributed transaction
coordinator) for the transactions. I have tested the setup with
DTCPing successfully:
http://www.microsoft.com/downloads/details.aspx?FamilyID=5e325025-4dcd-4658-a549-1d549ac17644&DisplayLang=en#QuickInfoContainer

But i keep getting this error: "The transaction has already been
implicitly or explicitly committed or aborted."
I have tried googling it, but most solutions were about firewall
issues which i do not use here.

Any clues
/Anders, Denmark
Smartkid
5/30/2007 12:00:00 AM
Sounds like your code using a transaction after Dispose() or Complete()
called.
Be care of nested TransactionScope,:

using (TransactionScope txOuter = new TransactionScope()) {
using (TransactionScope txFirst = new TransactionScope()) {
//exit without call txFirst.Complete();
}

using (TransactionScope txSecond = new TransactionScope()) { //you
got exception here, as txOuter will be rollback.
}
}



[quoted text, click to view]
4nd3r5 NO[at]SPAM gmail.com
5/31/2007 12:48:58 AM
I am using AutoComplete on my methods and TransactionOption.Required.
I don't think that is the problem.
Btw similar code is running on another server setup but this database
is 5 times bigger, and i may expect it is a timeout problem.

[quoted text, click to view]


4nd3r5 NO[at]SPAM gmail.com
5/31/2007 8:00:10 AM
This seemed to be a timeout problem. That was wrongly reported by the
system.

[quoted text, click to view]

AddThis Social Bookmark Button