How to Configure a Commerce Foundation Operation Service on the Application Tier

In a three-tier deployment scenario, the Commerce Foundation operation service is hosting the Microsoft Commerce Server 2009 R2 runtime. This topic provides information to help you configure the Commerce Foundation operation service endpoint in the application tier of a three-tier commerce deployment. You configure the operation service endpoint in the Web.config file located in the virtual directory of the Commerce Foundation Web application.

You can configure the Web site hosting the Commerce Foundation application to use an unsecure binding or to use Secure Sockets Layer (SSL).

Hh567718.alert_caution(en-us,CS.95).gifImportant Note:

For secure deployment, the use of secure bindings with Secure Sockets Layer is recommended for Commerce Foundation operation service endpoints.

Prerequisites

  • This procedure assumes that an instance of the Commerce Foundation Web application exists in IIS. For information about creating an operation service, see How to Create a Commerce Foundation Operation Service 

  • You know which type of bindings is appropriate for the operation service endpoint. The client and server endpoints must use compatible bindings.

Note

This topic provides a configuration example for using wsHttpbindings. In a three-tier commerce deployment, the operation service defining connection endpoints for a routing service where claims-based identities are delegated with requests to the service, you must configure endpoints with federated bindings. See How To Configure an Operation Service with Federated Bindings.

To Configure a Commerce Foundation Operation Service

Perform the following procedures in the order listed below to configure the Commerce Foundation operation service in a three-tier deployment:

  1. Configuring the Commerce Foundation Operation Service

  2. Configuring WCF Binding and Service Endpoint

Configuring the Commerce Foundation Operation Service

This topic shows the configuration that you must specify in the Web.config file on the application tier.

The following shows an example of a server-side Web.config file as it could be used in an operation service virtual folder.

<microsoft.commerce>
   <server>
     <GlobalTracing enabled="false" />
      <CommerceExceptionHandling defaultPolicyName="Default">
        <ExceptionPolicy name="Default">
         <ExceptionHandler name="TextLoggingExceptionHandler" type="Microsoft.Commerce.Server.TextLoggingExceptionHandler, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" initializeData="Microsoft.Commerce.Exceptions" />
         </ExceptionPolicy>
        </CommerceExceptionHandling>
   </server>
    
</microsoft.commerce>

To Configure the WCF Binding and Service Endpoint

In the Web.config file, specify the type of binding required for the Commerce Foundation operation service endpoint. The same binding type must be used for the service endpoint and the client endpoint defined on the presentation tier.

Following is a configuration example showing a non-secure connection (using wsHttpBinding) defined for the service endpoint.

<system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="errorHandlingBehavior" type="Microsoft.Commerce.Server.OperationErrorHandler, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </behaviorExtensions>
    </extensions>

<behaviors>
      <serviceBehaviors>
        <behavior name="OperationServiceBehaviour">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false" />
          <errorHandlingBehavior />
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpBinding_OperationService">
          <security>
            <message clientCredentialType="Windows"/>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>

    <services>
      <service name="Microsoft.Commerce.Server.OperationService"
        behaviorConfiguration="OperationServiceBehaviour" >
        <endpoint name="WsHttpOperationService" binding="wsHttpBinding" contract="Microsoft.Commerce.IOperationService" bindingConfiguration="wsHttpBinding_OperationService">
        </endpoint>
      </service>
    </services>
  </system.serviceModel>

See Also

Other Resources

Walkthrough: Deploying a SharePoint 2010 Commerce Solution in a Three-Tier Topology

Building the Application Tier in a SharePoint 2010 Commerce Deployment