views:

41

answers:

1

Are there any tips, tricks or methods for obtaining profiling/logging/debug information on the runtime behaviour of System.Transactions.TransactionScope?

I have an application which is committing data to the database, even though I'm using System.Transactions.TransactionScope, where an exception is thrown and TransactionScope.Commit() is never called.

I was wondering if there are events or details on other classes used by TransactionScope that I can query at runtime to establish whether my commands (typed data adapters) are enlisting the ambient transaction or not.

Having looked at System.Transactions.dll using Reflector, I think the System.Transactions.Diagnostics namespace might help, but any examples would be much appreciated.

A: 

Are you creating a transaction scope with parameters?

This behaviour would be expected for transaction scope option of Supress.

Otherwise could you post some code.

Shiraz Bhaiji