Search code examples
wcfmsdtc

WCF MSDTC Transaction elevated but not executed


I am not an expert on WCF and MSDTC so hopefully this is something simple. I have a client server, a web services server and a database. I want to be able to wrap calls to the web services server within a TransactionScope so that if something fails within the operation, I can back out. This setup works fine when all 3 components live on my local machine. When I move them to the separate servers, everything works until a call is within a TransactionScope.

I can see a transaction get added on both the client and web services server under dcomcnfg -> component services -> Computers -> My Computer -> Distributed Transaction Coordinator -> Local DTC. I see the same transaction show up on both machines. Problem is, it just waits for the timeout and fails. If I look at my transaction logs for the web service calls that should have taken have taken place within the TransactionScope, they are not there.

What am I missing?


Solution

  • In this case, it ended up being a firewall issue. I put off the idea of it being a firewall issue since I was seeing the transaction appear in the service server transaction list but adding the Distributed Transaction Coordinator to the allowed list for domain communication in the firewall fixed the issue.