This documentation is archived and is not being maintained.

ComContractElement Class

Specifies a COM+ integration service contract. This class cannot be inherited.

Namespace:  System.ServiceModel.Configuration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public ref class ComContractElement sealed : public ConfigurationElement

COM+ integration service contracts are currently restricted to the “” namespace, and the contract name is derived from the supporting COM interface. You can, however, specify alternatives by using the comContracts section in the configuration file.

You can use the following configuration to specify the namespace, contract name, and user defined types to be included. You can also specify other settings for a service contract

  <comContract contract="{5163B1E7-F0CF-4B6A-9A02-4AB654F34284}"
    name="_Broker" namespace=""
      <add exposedMethod="BuyStock" />
      <add exposedMethod="SellStock" />
      <add exposedMethod="ExecuteTransaction" />

When the service is initialized, the specified namespaces and contract names are applied to the generated service descriptions.


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0