I am having an issue setting up transactions in my application. When I perform a light weight transaction it works:
using (TransactionScope tx = new TransactionScope())
{
// Connect to Server 1 in a transaction
tx.Complete()
}
When I do a nested transaction, it fails:
using (TransactionScope tx = new TransactionScope())
{
// Connect to Server 1 in a transaction
using (TransactionScope tx2 = new TransactionScope())
{
// Connect to Server 2 in a transaction
tx2.Complete()
}
tx.Complete()
}
The error I am getting is:
The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B)
When I run the same exact code on a server, it works. I have MSDTC running/configured on my computer (settings identical to server).
Our networking department say they don't see any blocked traffic on the firewall.
I can DTC Ping from my computer to the server, but cannot from the server back.
Any ideas? I think it is a network issue, but need some help.
I can DTC Ping from my computer to the server, but cannot from the server back.
It seems like the reason. MSDTC requires both machines can see each other by NetBios names. You should be able to resolve IP to name both ways with 'nbtstat -a xxx.xxx.xxx.xxx'.
Also port 135 must to be opened on both machines.
It turned out to be a firewall issue. Thanks.
User contributions licensed under CC BY-SA 3.0