Advanced Debugging System.Transactions

Are there any tips, tricks, or methods for getting profiling / registering / debugging runtime information System.Transactions.TransactionScope?

I have an application that passes data to a database, although I use System.Transactions.TransactionScopewhere an exception is thrown and it TransactionScope.Commit()never gets called.

I was wondering if there are events or details of other classes used TransactionScopethat I can query at runtime to determine if my commands (typed data adapters) are completing an external transaction or not.

Having looked at System.Transactions.dllusing Reflector, I think a namespace System.Transactions.Diagnosticsmight help, but any examples would be appreciated.

+3
source share
2 answers

Extract from this article: http://blogs.msdn.com/b/madhuponduru/archive/2008/02/18/system-transactions-trace.aspx

Add the following information to the System.Transactions call tracking application configuration file

<configuration>
 <system.diagnostics>
  <sources>
   <source name="System.Transactions" switchValue="Information">
   <listeners>
    <add name="tx" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "tx.log" />
   </listeners>
  </source>
 </sources>
</system.diagnostics>

: , , SvcTraceViewer.exe MSDTC, CM, : http://msdn2.microsoft.com/en-us/library/ms229979.aspx http://msdn2.microsoft.com/en-us/library/ms678891.aspx http://support.microsoft.com/kb/926099/ http://support.microsoft.com/kb/898918/

+3

?

Supress.

.

0

Source: https://habr.com/ru/post/1722464/


All Articles