ServiceDomain Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Allows a code segment identified by Enter and Leave to run in its own context and behave as if it were a method that is called on an object created within the context. This class cannot be inherited.

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


public sealed class ServiceDomain


Creates the context specified by the ServiceConfig object and pushes it onto the context stack to become the current context.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Triggers the server and then the client side policies as if a method call were returning. The current context is then popped from the context stack, and the context that was running when Enter was called becomes the current context.


Returns a string that represents the current object.(Inherited from Object.)

The Enter and Leave methods are used in pairs to surround code that can then use COM+ services. Code that is enclosed between calls to Enter and Leave runs in its own context and behaves as if it were a method that is called on an object created within the context. The Enter and Leave pairs can be nested. It is up to the user to make sure that pairs of calls are balanced so that every call to Leave matches a previous call to Enter.

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top