System.Transactions -- "The transaction has already been implicitly or explicitly committed or abort

  • Thread starter Thread starter Ziga Jakhel
  • Start date Start date
Z

Ziga Jakhel

Hi, everybody! (sorry for double posting as news.microsoft.com)

I sure hope somebody has already stumbled upon a similar problem and found a
solution.

Basically I'm having a problem with establishing a transaction between my
app server and a sql server, both on different boxes.

When I try and open the connection, an "The transaction has already been
implicitly or explicitly committed or aborted" exception is thrown.

What happens is that the code.:


using (System.Transactions.TransactionScope scope = new
System.Transactions.TransactionScope())
{
using (System.Data.SqlClient.SqlConnection conn = new
System.Data.SqlClient.SqlConnection(ConnString))
{
conn.Open(); // <-- This is where the error occurs
//Do some work
}
}

....throws the exception when I try to open the connection. The
connectionstring points to sql server 2000 on a separate windows 2003 SP1
box. The app server box the code is running on is a Windows 2003 SP1 VPC on
top of Windows XP. I am running Beta 2, both MSDTCs have been configured
with minimum security settings (allowed network transactions, no
authentication necessary, etc.), the Windows firewall of the XP box hosting
the VPC is turned off, and I am in an AD environment with a Windows 2000
Domain Controller.

The same configuration works at home, the only difference is that I use a
WinXP Sp2 box for sql server and that I have NO domain. (I had to solve the
security problems, but it works now). Also, the code executes fine when no
transaction is used, so the connection is ok as well.

I would assume that the problem is essentially DTC-related, but really have
no clue on how to approach it. It really smells of the "MSDTC fails to
mutually authenticate when computers do not run in the same domain" problem
(http://www.dotnet247.com/247reference/a.aspx?u=http://support.microsoft.com/?id=827805)
apart from the machines actually being in the same domain and that rpc
security has been turned off. Any ideas, hints, or tips would be greatly
appreciated.


Thank you & best regards,


Ziga Jakhel

ziga.jakhel(at)rrc.si
 
Are the client and server running on the same domain? I had a similar
problem when the server and client where on different domain and one of the
domain did not trust the other.
HTH,
Sushil.
 
Yes, they are in the same domain. And yes, the behaviour is exactly the
same. That's what's bugging me.

Any idea what happens if you have several VPCs with images of the same
Windows2003 installation in the same domain (all were added to the domain
individually at different times)? Any chance of that being a problem because
of some identical GUIDs and AD acting funny because of it?

Regards,

Ziga
 
Ziga, I havent run on a VPC myself; I wouldnt be suprised if that turns out
to be the reason your case is failing. Is your MSDTC service configured with
"No Authentication"
 
Yes, it has been configured with no authentication & all the other options
on both ends.

Gotta finish this project now, then I'm trying the dtcping... my money is no
the dtcs not seeing each other properly (probably some ip resolving issue).

Thanks for the goodwill anyway :)


Regards,

Ziga
 
Back
Top