Multiple Commerce Server Sites in the Same Application

Multiple Commerce Server 2009 R2 sites can be hosted within a single application or Web Application.  By hosting multiple Commerce Server 2009 R2 sites per Web Application, you can reduce the total number of Web Applications and application pools required per server.

Note

This feature is only supported with the Commerce Server 2009 R2 API.

Note

Host named site collections are recommended for multi-site applications.

You can also create path based root and non-root site collections. This implementation requires a network appliance (such as a load balancer) that can map each site of the site collection to a different domain so that Web browsers will pass unique cookies to each SharePoint 2010 Web site. This is required to separate authentication between different site collections within the same Web application.

This topic contains the following information:

  • Enabling Multi-site Support

  • Enabling Multi-site Support for an Existing Deployment

Enabling Multi-site Support

The following changes are required to implement multi-site support:

  • Increase the amount of shared memory for performance counters. The memory for the performance counters is allocated globally and shared by all applications. Adding Commerce Server 2009 R2 sites will require that they have their own set of performance counters, which could exceed the amount of allocated memory. An error is generated when the system has exceeded the amount of allocated memory. You can increase the file mapping size by increments of 512K to determine how much memory is required for your system. (Maximum size is 33554432 bytes.) Open the Machine.config file and increase the mapping size, and then restart the system to apply the change. For example:

    <system.diagnostics>
       <performanceCounters filemappingsize="33554432" />
    
  • You must set useSharedCommerceContext to false. This causes the application server to initialize the Commerce Server 2009 R2 contexts. This is set in the ChannelConfiguration.config file.

    <CommerceChannelConfiguration xmlns="urn:schemas-microsoft-commerce-server-multichannel" useSharedCommerceContexts="false">
    
  • It is important that each Commerce Server 2009 R2 site use different instances of the pipeline definition PCF file.

  • Commerce Foundation Channel is a new model for Commerce Server 2009 R2 application deployments when there is more than one Commerce Server 2009 R2 site. The Channel entity must be used to retrieve the list of available catalogs. This entity replaces Commerce Foundation Site.

Enabling Multi-site Support for an Existing Deployment

The following changes are required to implement multi-site support for an existing deployment:

  • All custom DataContract classes must contain the [Serializable] .NET attribute:

     [Serializable]
    
  • You must install a second host named site collection. The second Commerce Server 2009 R2 site must be created from the Solution Storefront site (with data) PuP file.

  • To configure your sites, follow the steps in How to Configure Multiple Commerce Server Sites Hosted within a Single Web Application, starting with the topic "Manually edit the configuration files for the second site".

In this Section

How to Configure Multiple Commerce Server Sites Hosted within a Single Web Application

Security and Performance for Multiple Commerce Server Sites in the Same Application

See Also

Other Resources

Non-Root Site Collections