Configuring a Custom Scope Provider

A client application adds a reference to the custom scope provider class by using the <scopeProvider> element in the <channelFactory> section of the <cis.serviceModel> section of a configuration file.

The following code example shows the default scope provider configuration.


                  <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  ...
  <cis.serviceModel>
    <channelFactory>
      ...
      <scopeProvider type="Microsoft.ConnectedIndustry.ServiceModel.Application.ScopeProvider,Microsoft.ConnectedIndustry.ServiceModel.Application,Version=1.0.0.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      </scopeProvider>
      ...
    </channelFactory>
  </cis.serviceModel>
  ...
</configuration>

                

To use a custom scope provider class named DCS.Samples.Extensions.MyCustomScopeProvider in an assembly named DCSExtensions, change the <scopeProvider> element as shown in the following code example.


                  <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  ...
  <cis.serviceModel>
    <channelFactory>
      ...
      <scopeProvider type="DCS.Samples.Extensions.MyCustomScopeProvider, DCSExtensions" />
      ...
    </channelFactory>
  </cis.serviceModel>
  ...
</configuration>

                
Show: