ContextUtil.TransactionId Property


Gets the GUID of the current COM+ DTC transaction.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public static Guid TransactionId { get; }

Property Value

Type: System.Guid

A GUID representing the current COM+ DTC transaction, if one exists.

Exception Condition

There is no COM+ context available.


The platform is not Windows 2000 or later.

The following code example gets the value of a TransactionId property.

public class ContextUtil_TransactionId : ServicedComponent
    public void Example()
        // Display the ID of the transaction in which the current COM+ context
        // is enlisted.
        Console.WriteLine("Transaction ID: {0}", ContextUtil.TransactionId);

.NET Framework
Available since 1.1
Return to top