VinayVelugu
VinayVelugu

Reputation: 1

Distributed Transaction using TransactionScope

I have data which needs to be saved in two components (A, B). Component C talks to B using WCF and talks to A using .Net Remoting. Since C talks to B using WCF I am using TransactionScope (Issue in passing transaction using WCF). C and A are in same system. B is in a different system. Data commit happens only when Save is successful in both A and B. Code looks something like below:

`using(TransactionScope)
{
   isSuccessX = serverB.Save(dataX);
   isSuccessY = serverA.Save(dataY);

   if(isSuccessX && isSuccessY)
   {
        TransactionScope.Complete();
   }
}`

When A,B and C are in same system, data save has no problem. When (A,C) and B are in different systems, we are seeing error: "The flowed transaction could not be unmarshaled. The following exception occurred: Communication with the underlying transaction manager has failed.Inner Exception:" I have allowed all programs\ports in firewall. I allowed remote clients for DTC in component services. Any thoughts on how to make this work? An suggestions on alternatives for this workflow?

I tried DTCPing, enabled Remote clients in Component services.

Upvotes: 0

Views: 70

Answers (1)

VinayVelugu
VinayVelugu

Reputation: 1

Hostname of the systemB is not matching with the hostname mentioned in hosts file in systemA. Because of this, transaction is not created between systemA and systemB. Transaction is created without modifying anything in LocalDTC properties in ComponentServices.

Upvotes: 0

Related Questions