ComContractsSection Class
Represents a configuration section that contains elements for specifying the namespace and contract name for a COM+ integration contract. This class cannot be inherited.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The COM+ integration service contracts are currently restricted to the “http://tempuri.org” namespace, and contract name is derived from the supporting COM interface. You can, however, specify alternatives by using the comContracts section in the configuration file. For example, you can use the following configuration to specify the namespace and contract name for a service contract
<!-- <configuration> --> <!-- <system.serviceModel> --> <!-- <services> --> </services> <!-- <comContracts> is under <system.ServiceModel> --> <!-- it is at same level as <services> or <behaviors> --> <comContracts> <comContract contract="{C551FBA9-E3AA-4272-8C2A-84BD8D290AC7}" name="IPayroll" namespace="http://contoso.com/services/financial" /> <comContract contract="{BBA0C8B8-78DC-4C7B-919D-D2253100896B}" name="ISupplies" namespace="http://contoso.com/services/supplychain" /> </comContracts> <behaviors> <!-- </behaviors> --> <!-- </system.serviceModel> -->
When the service is initialized, the specified namespaces and contract names are applied to the generated service descriptions.
When this section is empty, the service initialization applies a default namespace and contract name taken from the supporting COM interface ID.
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationSection
System.ServiceModel.Configuration.ComContractsSection
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.