Error: No content selection context with the name ‘Advertising’ exists for the site ‘MyDefaultSite’
ravikanth | April 3, 2009After creating blank site using MicrosoftCommerceDefaultSiteNoData.pub file, when I tried to access Advertisements, I am getting following error.
|
An exception of type ‘Microsoft.Commerce.Providers.Exceptions. InvalidOperationRequestException’ occurred and was caught. ————————————————————————— 03/26/2009 10:29:36 Type : Microsoft.Commerce.Providers.Exceptions. InvalidOperationRequestException, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Message : No content selection context with the name ‘Advertising’ exists for the site ‘MyDefaultSite’. Please see the service configuration file section ServiceConfiguration/Sites/Site[@sitename='MyDefaultSite']/contentSelection for the list of configured selection context names. Source : Microsoft.Commerce.Providers Help link : Data : System.Collections.ListDictionaryInternal TargetSite : Microsoft.CommerceServer.Runtime.Targeting. ContentSelectionContext GetSelectionContext(System.String, System.String) Stack Trace : at Microsoft.Commerce.Providers.CSHelpers.ContentSelectionHelper. GetSelectionContext(String siteName, String contextName) at Microsoft.Commerce.Providers.Components.ContentSelectorLoader. ExecuteQuery(CommerceQueryOperation queryOperation, OperationCacheDictionary operationCache, CommerceQueryOperationResponse response) at Microsoft.Commerce.Providers.Components.OperationSequenceComponent. Execute(CommerceOperation operation, OperationCacheDictionary operationCache, CommerceOperationResponse response) at Microsoft.Commerce.Broker.OperationSequence.ExecuteComponentTree (List`1 executionTreeList, CommerceOperation operation, OperationCacheDictionary operationCache, CommerceOperationResponse response) at Microsoft.Commerce.Broker.OperationSequence.Execute (CommerceOperation operation) at Microsoft.Commerce.Broker.MessageHandler. ProcessMessage(String messageHandlerName, CommerceOperation operation) at Microsoft.Commerce.Broker.OperationService. InternalProcessRequest(CommerceRequest request) at Microsoft.Commerce.Broker.OperationService. ProcessRequest(CommerceRequest request) |
Resolution:
We will get this error because of not defining content selection in channel configuration. To fix this issue, open channelconfiguration.config file, add cache for advertising and discounts under <caches> tag and add advertising and discounts to contentselection as shown in the image below.