1

I am currently working on a small application in C# to check several errors and timeout settings of Transactions using Microsoft DTC.

I found the MSDTC Manager at CodeProject (http://www.codeproject.com/Articles/729805/MSDTC-Manager) which was very helpfull already. It is based on http://technet.microsoft.com/en-us/library/cc759136(v=ws.10).aspx

What I couldn't figure out yet, is how to read/access the timeout property programmatically (in C#) which can be found in the Component Services (Windows > Run > comexp.msc): Component Services > Computers > My Computer > Properties > Options > Transaction Timeout

I already tried to use the Process Monitor from Sysinternals when changing the value from 60 to 120 for example, to trace Registry changes or any other kind of change, but by changing the timeout value I get like hundreds of lines, but non of them cleary state which one is the correct one.

Any ideas? Thanks a lot!

DominikAmon
  • 596
  • 1
  • 9
  • 21

1 Answers1

2

In visual studio

  1. Go to References
  2. Go to COM Type Libraries
  3. Add a reference to the COM + 1.0 Admin Type Library
  4. Use code similar to the following

    var catalog = new COMAdmin.COMAdminCatalog();
    catalog.Connect(System.Environment.MachineName);
    var coll = (COMAdmin.ICatalogCollection)catalog.GetCollection("LocalComputer");
    coll.Populate();
    var catalogObject = (COMAdmin.ICatalogObject)coll.Item[0];
    var timout = catalogObject.Item[0].Value["TransactionTimeout"];
    
Community
  • 1
  • 1
Hasani Blackwell
  • 1,948
  • 1
  • 12
  • 9