TransactionScope don't work

Hi all:

First of all, excuse me for my poor english, i'm from Argentina. Now the problem:

I'm developing a Web APP with VB.NET in a Windows XP SP2, that connects to a Windows 2003 Server SP2. After A LOT of searching, i can make the DTCPing and DTCTester utilitys ran fine, in both directions (except the DTCTester, of course, just from XP -> SERVER 2003).

The problem ocurrs when the program code connects to the DataBase (that code it's inside the TransactionScope), there it launches the following error:

"The partner transaction manager has disabled its support for remote/network transactions Exception from HRESULT: 0x8004D025"

It's a really odd thing, because both DTCPing and DTCTester runs with no problem...

Best Regards!!!!!.

Eric.

[849 byte] By [Eric1984] at [2008-1-10]
# 1

Hi Eric,

Yeap, this is weird as both DTCPing and DTCTester ran successfully.

To help further diagnose the issue, could you provide the below information?

1) Dtc Security settings on both machine.

To find Dtc Security settings, on a cmd window, launch dcomcnfg, go to Compters->My Computer->Distributed Transaction Coordinator -> Local DTC. Right click on "Local DTC", then choose "Properties" from the drop down. ON the Properties window, choose Security Tab.

2) Code around using TransactionScope.

-Hong

HongDai at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...
# 2
Yep, it's a very strange issue. Here's the security settings:

XP SP 2 MACHINE (VS 2005 latest SP) AND WINDOWS SERVER 2003 SP2 MACHINE:


Network DTC Access = Checked
Allow Remote Clientes = Checked
Allow Remote Administration = Checked
Allow Inbound = Checked
Allow Outbound = Checked
No authentication Required = Selected
Enable TIP Transactions = Checked
Enable XA Transactions = Checked

Here's the Code:

Public Overrides Sub ApplyEdit()
Using oTrans As New TransactionScope
MyBase.ApplyEdit()
Try
oConexionDB = New ConexionDB()
oConexionDB.ConectarDB() '// HERE LAUNCHES THE ERROR

'// DO SOME WORK HERE

Catch ex As Exception
Throw ex
Finally
oConexionDB.DesconectarDB()
oConexionDB = Nothing
End Try

oTrans.Complete()

End Using

End Sub

Public Sub ConectarDB()
Me.oSQLConexion.ConnectionString = Me.GetConfigConectionStringManager

Me.oSQLConexion.Open() '// IN THIS LINE RAISES THE ERROR
End Sub

Hope this clarify!. Thanks in advance!!!.

Eric1984 at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...
# 3
Hello,

You might want to consider changing your firewall settings as well, to allow access for
'%windir%\system32\msdtc.exe'.

Also check the following thread:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=230390&SiteID=1

Hope this helps,
Dragos

DragosIoanHaiduc at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...
# 4

Hi Eric,

The Security settings and the code look good. Pls try what Dragos suggested, i.e. check the firewall settings on both machines(make sure MS DTC console program is checked in the Exception list) and then reboot machines.

Let me know if it doesn't solve your problem.

Hong

HongDai at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...
# 5
Hi there:

Finally after rebooting both computers, it worked =)

Thanks!

Eric1984 at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...

Software Development for Windows Vista

Site Classified