Commerce Server 2009 R2 Assembly and Namespace Changes
introduces assembly and namespace changes to the Multi-Channel Commerce Foundation API. You must update your site code to reference these new assemblies to ensure that your site functions properly on Commerce Server 2009 R2.
See the following sections for more information:
New Assemblies
Namespace Changes
Changes to Tracing, Logging, and Exception Management Classes
Configuration File Changes
New Assemblies
Commerce Server 2009 used five foundation assemblies. These have been reorganized into three assemblies in Commerce Server 2009 R2. In addition, all Commerce Server 2009 R2 assemblies are re-versioned to 9.0.0.0.
The following table summarizes that mapping of Commerce Server 2009 assemblies to Commerce Server 2009 R2 assemblies
Commerce Server 2009 Assembly |
Commerce Server 2009 R2 Assembly |
---|---|
Microsoft.Commerce.Application.Common.dll |
Microsoft.Commerce.Server.dll |
Microsoft.Commerce.Broker.dll |
Microsoft.Commerce.Server.dll |
Microsoft.Commerce.Providers.dll |
Microsoft.Commerce.SequenceComponents.dll |
Microsoft.Commerce.Common.dll |
Microsoft.Commerce.dll |
Microsoft.Commerce.Contracts.dll |
Microsoft.Commerce.dll |
New Extensions Assembly
In an effort to remove Foundation dependencies on third party software, the following components (formerly in the Commerce Server 2009 Microsoft.Commece.Providers assembly) are now contained in the new Microsoft.Commerce.SequenceComponents assembly:
SharepointImageGalleryProcessor
SharepointImageGalleryProcessorConfiguration
SharepointListItemProcessor
SharepointListItemConfiguration
SiteContentSearchLoader
SPListMetadataLoader
VEClientTokenQueryProcessor
VENearbyStoreQueryProcessor
Namespace Changes
In an effort to reduce the number of namespaces used and to accommodate the new assemblies, Commerce Server 2009 R2 introduces several namespace changes. The following table summarizes the mapping of Commerce Server 2009 namespaces to Commerce Server 2009 R2 namespaces.
Commerce Server 2009 Namespace |
Commerce Server 2009 R2 Namespace |
---|---|
Microsoft.Commerce.Providers |
Microsoft.Commerce.SequenceComponents |
Microsft.Commerce.Broker |
Microsoft.Commerce.Server |
Microsoft.Commerce.Broker.Configuration |
Microsoft.Commerce.Server.Configuration |
Microsoft.Commerce.Broker.Resources |
Microsoft.Commerce.Server |
Microsoft.Commerce.Application.Common |
Microsoft.Commerce.Server |
Microsoft.Commerce.Application.Common.Configuration |
Microsoft.Commerce.Server.Configuration |
Microsoft.Commerce.Application.Common.Configuration.CommerceSite |
Microsoft.Commerce.Server.Configuration.CommerceSite |
Microsoft.Commerce.Common |
Microsoft.Commerce |
Microsoft.Commerce.Common.Configuration |
Microsoft.Commerce.Configuration |
Microsoft.Commerce.Common.MessageBuilders |
Microsoft.Commerce |
Microsoft.Commerce.Common.MessageBuilders.Advanced |
Microsoft.Commerce.Advanced |
Microsoft.Commerce.Common.ObjectBuilder |
Microsoft.Commerce.Configuration |
Microsoft.Commerce.Contracts |
Microsoft.Commerce |
Microsoft.Commerce.Contracts.CommerceEntities.Metadata |
Microsoft.Commerce.Definitions |
Microsoft.Commerce.Contracts.Faults |
Microsoft.Commerce |
Microsoft.Commerce.Contracts.Messages |
Microsoft.Commerce |
Changes to Tracing, Logging and Exception Management Classes
The assemblies and namespaces for tracing, logging and exception management classes have been moved in Commerce Server 2009 R2 from **Microsoft.Commerce.Application.Common **to Microsoft.Commerce.Server.
The following is a list of the classes that have been moved.
public class EtwTraceListener
public enum TraceLayer
public static class Logger
public class Tracer : IDisposable
public abstract class ExceptionFormatter
public interface IExceptionHandler
public class ExceptionHandlerConfigurationCollection : ConfigurationElementCollection
public class ExceptionHandlerConfigurationElement : ConfigurationElement
public class ExceptionHandlingConfigurationSection : ConfigurationSection
public static class ExceptionManager
public class ExceptionPolicyConfigurationCollection : ConfigurationElementCollection
public class ExceptionPolicyConfigurationElement : ConfigurationElement
public class LoggingExceptionHandler : IExceptionHandler
public class TextExceptionFormatter : ExceptionFormatter
public class TextLoggingExceptionHandler : LoggingExceptionHandler
public class XmlExceptionFormatter : ExceptionFormatter
public class XmlLoggingExceptionHandler : LoggingExceptionHandler
public class EventIDFilter : EventIDFilter
public class EventIdExclusionFilter: EventIdExclusionFilter
Important Note: |
---|
The class RoutingService (namespace: Microsoft.Commerce.Server, assembly: Microsoft.Commerce.Server.dll) has been renamed to CommerceRoutingService. |
Configuration File Changes
Two main sections have been added to the Commerce Server 2009 R2 Web.config file under the configSections element to support two-tier and three-tier deployment scenarios.
In a two-tier application, both the CommerceService section group and the CommerceClient section must be configured in the same file. In a three-tier deployment, the presentation tier must have CommerceClient and the application tier must have CommerceService.
The following is a sample of the configSections element:
<configSections>
<sectionGroup name="CommerceService" type="Microsoft.Commerce.Server.Configuration.CommerceServiceConfiguration, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="CommerceChannelConfiguration" type="Microsoft.Commerce.Server.Configuration.CommerceChannelConfiguration, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<section name="CommerceExceptionHandling" type="Microsoft.Commerce.Server.ExceptionHandlingConfigurationSection, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<section name="GlobalTracing" type="Microsoft.Commerce.Server.Configuration.GlobalTracing, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<section name="Debug" type="Microsoft.Commerce.Server.Configuration.CommerceServiceDebugConfigurationSection, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<section name="CommerceMembership" type="Microsoft.Commerce.Server.Configuration.CommerceMembershipConfiguration, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</sectionGroup>
<section name="CommerceClient" type="Microsoft.Commerce.Configuration.CommerceClientConfiguration, Microsoft.Commerce, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</configSections>
CommerceService Configuration Section Group
The CommerceService section group has a global tracing and a debug element that can be enabled and two configuration sections that you must edit for your installation.
Configuration Section |
Type |
Default |
Description |
---|---|---|---|
GlobalTracing |
Bool |
False |
Enables tracing. |
Debug |
Bool |
False |
Enables debugging. True indicates that the details of the exception will be included in the Fault. False (the default) means a generic error message will be returned. In either case the error details will be logged to the event log. For security reasons (Denial of Service attach mitigation) production environments should either not have this element at all or it should be set to false. |
CommerceChannelConfiguration |
String |
ChannelConfiguration.config |
Replaces "ServiceConfiguration". This identifies the Channel Configuration file. |
CommerceExceptionHandling |
This is now in the CommerceService section group. |
<!-- Commerce Foundation Services server-side configuration -->
<CommerceService>
<GlobalTracing enabled="false" />
<Debug includeExceptionDetails="false" />
<CommerceChannelConfiguration configSource="ChannelConfiguration.config" />
<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>
<ExceptionPolicy name="TestPolicy">
<ExceptionHandler name="XmlLoggingExceptionHandler" type="Microsoft.Commerce.Server.XmlLoggingExceptionHandler, Microsoft.Commerce.Server, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" initializeData="Microsoft.Commerce.Exceptions" />
</ExceptionPolicy>
</CommerceExceptionHandling>
</CommerceService>
CommerceClient Element
You must configure the Web presentation layer so that it can find an operation service, as well as list all of the available operation services.
To use t3-tier applications, you must:
Set the CommerceOperationService mode element to "Service".
Set the value of the clientEndpointName attribute to the name of the WCF client endpoint that is used to communicate with the Commerce Foundation operation service.
Set the commerceRouter element attribute operationServiceEndpointName to the same WCF client endpoint that the router uses to communicate with Commerce Foundation. Also, note that this is only required if using the Router Service. It is not required for clients sending requests directly to the OperationService.
You may have multiple services listed in this mode.
Note
The ServiceLocator<T> class now has a constructor overload that accepts the CommerceOperationService name as a parameter. The zero-arg constructor is still supported, in which case the ServiceLocator will look for an OperationService whose name is the same as the type parameter T.
Sample for mode="Service":
<!-- Commerce Foundation client-side configuration -->
<CommerceClient>
<CommerceOperationServices>
<!-- IOperationService identifies the operation service in configuration. -->
<!-- clientEndpointName is the name of a WCF client endpoint -->
<CommerceOperationService
name="IOperationService"
mode="Service"
clientEndpointName="IOperationService_NamedPipe" />
</CommerceOperationServices>
<CommerceRouter operationServiceEndpointName="IRoutingService_NamedPipe" />
</CommerceClient>
If mode = "InProcess", you must specify the "implementation" attribute.
You can have only one service listed in this mode.
<CommerceOperationService
name="IOperationService"
mode="InProcess"
serviceImplementationType="Microsoft.Commerce.Server.OperationService, Microsoft.Commerce.Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</CommerceOperationServices>
These replace the following sections:
GlobalServiceConfiguration
ServiceConfiguration
commerceExeptionHandling (moved to CommerceService section group)