How to export Transaction token to remote process
Unmanaged code:
Florin wrote sample on this topic
https://blogs.msdn.com/florinlazar/archive/2004/10/02/236965.aspx
Managed code:
#1 (.NET 2.0)
- Create a System.Transactions.Transaction object, one way or another.
- Use System.Transactions.TransactionInterop.GetTransmitterPropagationToken to generate a propagation token.
- Transfer the bytes to the other side using your favorite mechanism (base64-encoded header element?)
- Call System.Transactions.TransactionInterop.GetTransactionFromTransmitterPropagationToken to get a Transaction object back.
For this to work, of course, the following must be true:
- Each of the parties must be addressable to the other.
- Each of the parties must be able to send RPCs to the other
#2(.NET 3.0):
If you are using WCF,WCF can export transaction context information in the soap message,remote service can use this transaction context info and can join transaction