VB6.0(Windows 2000) and WCF Transactions(Widows 2003) Issue

Hi,

I have a unique scenario , in a way that i have vb6.0 client app installed on windows 2000 and WCF Serice on Windows 2003 Server. I was able to access WCF Serice functionality through the client proxy generated with Wsdl.exe(not with SvcUtil.exe) but I am stuck at the point how to implement transactions in VB6.0?

I am using basichttpbinding as the binding configuration for now but it doesn't support transastions.Perhaps I have to use wsHttpBinding instead and WCF service moniker for transactions but WCF service moniker requires WCF installed on the client machine which is Windows 2000 professional and not suppored for WCF.

Any suggestions or samples would be appreciated!

[731 byte] By [leoguy] at [2008-1-4]
# 1

Are you working with System.Transactions or with C++?

One workaround for this is to get the transaction propagation token and pass it as an argument to the service method:

Using System.Transactions you would do the following to get the transaction propagation token on your client side:

Using scope As New TransactionScope()

Dim propagationToken as Byte()

propagationToken = TransactionInterop.GetTransmitterPropagationToken(Transaction.Current)

// Make the call to your WCF service passing propagationToken as an argument

scope.Complete()

end Using

In the WCF service:

Dim currentTransaction as Transaction;

currentTransaction = TransactionInterop.GetTransactionFromTransmitterPropagationToken(propagationToken)

Using scope as new TransactionScope(currentTransaction)

// Do the transactional work for your service.

scope.Complete()

end Using

Please let me know if you have any other questions.

IanMarshall at 2007-10-11 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...
# 2

Hi Marshall,

Thankyou very much for the reply, infact I resolved it before your post by following the same path.

i.e using the propagation token

Thanks,

leo

leoguy at 2007-10-11 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...

Software Development for Windows Vista

Site Classified