Freshblood
Freshblood

Reputation: 6441

How can i do transaction between remote services?

I have to do 2 job which is on remote services not belongs to me.I have to register or upgrade a product on first remote service and i have to get payment via VPOS on second service.

Is it possible to make a kind of transaction in this case ?

Upvotes: 0

Views: 95

Answers (1)

Dave Markle
Dave Markle

Reputation: 97811

It depends on whether or not the remote services implements distributed transactions. If it does not, you can't -- you will have to code around to try to compensate for the previous transaction.

If the other server runs something like MSDTC and you're connecting though a web service that supports WS-Transactions, you should just be able to wrap your call in a TransactionScope object (from the System.Transactions assembly). It's rare that application service providers to this, though.

Upvotes: 1

Related Questions