Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Pipeline Editor displays registered custom pipeline components as unknown in 64 Bit version.

ravikanth | August 26, 2010

If you are using commerce server 2007/2009 on 64 bit machine and used pipeline component registration wizard to register pipeline components and if we try to open 64 bit pipeline editor, you may not see your component rather you will see "<<unknown>>” message. This issue occurs because Pipereg.exe cannot recognize 64-bit architecture. To resolve this issue, follow below steps.

  • Use the 64-bit version of the Assembly Registration tool (Regasm.exe) to prepare the custom pipeline components for registration(C:\Windows\Microsoft.NET\Framework64\v2.0.50727). So, open Open a command prompt, Change default installation folder for the .NET Framework and run below command.
    regasm MyAssemblyComp.dll /tlb:MyAssemblyComp.tlb 
  • Use Pipereg.exe to register the type library file that you created in above step. Make sure that you select the Export registration data option to export the registry information to a .reg file. 
  • At a command prompt, run the .reg file that you created above or run the .reg file directly from Windows Explorer.

If you check, the custom pipeline components appear correctly in the 64-bit version of Pipeline Editor. 

Optional: If you still have the issue then you can use Microsoft regcleaner tool to clean the unnecessary registry entries from the system and perform above steps again. Warning Serious problems might occur if you opt this method and you reinstall the operating system. No one (including Microsoft) cannot guarantee that these problems can be solved. So, modify the registry at your own risk.

Comments
No Comments »
Categories
Troubleshoot
Comments rss Comments rss
Trackback Trackback

Failed to set value for profile property ‘email_address’.

ravikanth | June 15, 2010

For past few days, the below exception has taken away my sleep. This error occurs in our pre-prod environment and it is totally unpredictable. You may get or may not get with the same data. Profile registration is first page to any ecommerce application and as it is failing here and as usual everyone swords are towards me for the fix.

An exception of type ‘Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileSystemException’ occurred and was caught.

————————————————————————————————————————
06/15/2010 03:58:49
Type : Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileSystemException, Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\
Message : Failed to set value for profile property ‘email_address’.
Source : Microsoft.CommerceServer.Runtime
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void set_Value(System.Object)
Stack Trace : at Microsoft.CommerceServer.Runtime.Profiles.ProfileProperty.set_Value(Object value)
at Microsoft.Commerce.Providers.Translators.ProfileTranslatorBase.SetProperty(Profile destinationObject, String propertyName, Object propertyValue)
at Microsoft.Commerce.Providers.Translators.ProfileTranslatorBase.TranslateInternal(CommerceEntity sourceObject, Profile destinationObject, CommercePropertyCollection propertiesToReturn)
at Microsoft.Commerce.Providers.Translators.UserProfileTranslator.Translate(CommerceEntity sourceCommerceEntity, Object destinationObject)
at Microsoft.Commerce.Providers.Translators.Translator.ToExternalEntity(CommerceEntity sourceCommerceEntity, Object destinationType)
at Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.Update(IEnumerable`1 commerceProfileList, CommerceEntity operationModel)
at Microsoft.Commerce.Providers.Components.ProfileCommitterBase.ExecuteUpdate(CommerceUpdateOperation updateOperation, OperationCacheDictionary operationCache, CommerceUpdateOperationResponse response)
at Microsoft.Commerce.Providers.Components.OperationSequenceComponent.Execute(CommerceOperation operation, OperationCacheDictionary operationCache, CommerceOperationResponse response)
at Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.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)

Since the error is happening in translator, I suspect that I am passing wrong data to the commerce server. I verified that user_id (guid) and email address are sent from controller class. I google or binged but no luck.

Missile trigger happens at one place and damage at another place. This problem comes under same category. Everybody sees this as commerce server exception as below error found in event log with lot of “commerce” words. After lot of efforts, I found that the error is due to assigning to wrong GUID and email_ID. For example, consider following data.

user_ID email ID
Guid1 user1@test.com
Guid2 user2@test.com

First I sign-in with user 1 and both user_id and email_id are stored in cookie. I press sign-out email_id is removed from cookie but not user_id. The second time, I logged in with user2 now this time, the user 2 email_id is keep in cookie but  its GUID is not updated (as the old object already exist in the cookie). When I try to save user profile, I am passing GUID1 and user2@test.com to commerce server and it is throwing exception as the update operation tries to update row 1 with user2@test.com in email_id field (which is a unique key).

Comments
No Comments »
Categories
Commerce Server 2009, Troubleshoot
Comments rss Comments rss
Trackback Trackback

ArgumentException: An item with the same key has already been added.

ravikanth | June 12, 2010

After successful application deployment in pre-production environment and when I ran the application start page, I got below exception. We shouted “Not Again”… setting up of CS2009 application is not a simple task and automating the installation is a nightmare (as usual, we doubted our installation tool for not installing the application correctly). The exception is wired and we are not able to figure out why the error has occurred?

An exception of type ‘System.ArgumentException’ occurred and was caught.
————————————————————————
06/12/2010 05:22:20
Type : System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : An item with the same key has already been added.
Source : mscorlib
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void ThrowArgumentException(System.ExceptionResource)
Stack Trace :    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Microsoft.Commerce.Application.Common.Configuration.ServiceConfiguration.CreateDictionary(String channelName)
   at Microsoft.Commerce.Application.Common.Configuration.ServiceConfiguration.GetSiteName(String channel)
   at Microsoft.Commerce.Broker.OperationService.InitializeOperationContext(CommerceRequest request)
   at Microsoft.Commerce.Broker.OperationService.ProcessRequest(CommerceRequest request)

CS2009 exceptions are not user friendly. You need more troubleshooting skills to see what is the problem and where exactly to tweak to make the application work. Since our site is running on variations (to support multiple languages), I had make sure that our site channel configuration is pointed to correct values. 

To troubleshoot these kind of errors, I suggest every CS2009 developer to download Reflector tool. This tool will help us see how the assembly code has written and what values it is expecting and on which condition it is throwing certain exception. After troubleshooting further, I came to know that the old site is not deleted which is currently pointing to same commerce server site and running in same application pool. After stopping the old site, my site started working. Seems CS2009 is adding the site name to a dictionary and it is throwing “An item with the same key has already been added.“exception as the site name was already entered by the first site into the dictionary.

Comments
No Comments »
Categories
Commerce Server 2009, Troubleshoot
Comments rss Comments rss
Trackback Trackback

Error: Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault

ravikanth | June 5, 2010

On saving customer profile and performing the update, I am getting wired error (as shown in below table).

Type : System.ServiceModel.FaultException`1[[Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault, Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The requested item does not exist.
Source : Microsoft.Commerce.Providers
Help link :
Detail : Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault
CommerceEntityName : UserProfile
Action :
Code : System.ServiceModel.FaultCode
Reason : The requested item does not exist.
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Collections.Generic.List`1[Microsoft.CommerceServer.Runtime.Profiles.Profile] GetMatches(Microsoft.Commerce.Contracts.Messages.CommerceModelSearch, System.Nullable`1[System.Int32] ByRef, Boolean)

Stack Trace : at Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.GetMatches
CommerceModelSearch searchCriteria, Nullable`1& totalItemCount, Boolean throwIfNotFound)

Apart from this error, nothing is written in event log. Running SQL trace also didn’t help as I haven’t seen entries coming there. Using reflector, when I go through the assembly, I found on interesting thing (check below image).

image

Commerce server while retrieving values, checks if their are any values in the key property, if not found it will throw item not found exception. Later I figured out that in my code, I am passing wrong user ID to commerce server, thus triggering this error.

Comments
No Comments »
Categories
Commerce Server 2009, Troubleshoot
Comments rss Comments rss
Trackback Trackback

Troubleshoot: Configuration specifies useSharedCommerceContexts=true. Contexts cannot be requested for other Commerce Server sites.

ravikanth | May 14, 2010

Today, I got latest code from TFS and setup my application. When I execute the application I got wired error.

An exception of type ‘Microsoft.Commerce.Providers.Exceptions.ContextCreationException’ occurred and was caught.
————————————————————————————————-
Type : Microsoft.Commerce.Providers.Exceptions.ContextCreationException, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Message : Configuration specifies useSharedCommerceContexts=true. Contexts cannot be requested for other Commerce Server sites.
Source : Microsoft.Commerce.Providers
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Microsoft.CommerceServer.Catalog.CatalogContext get_Item(System.String)
Stack Trace : at Microsoft.Commerce.Providers.ContextProviders.Shared.CatalogContextProvider.get_Item(String siteName)
at Microsoft.Commerce.Providers.Metadata.CatalogMetadataProvider..ctor(String siteName)
at Microsoft.Commerce.Providers.Metadata.CatalogMetadataLoader.GetSubsystemMetadata(String siteName)
………………………….
………………………….
………………………….

I have only one commerce server site configured in my application and from frontend configuration, I can’t connect to another commerce server in different machine (currently CS and MOSS are hug and can’t work from different machines). After troubleshooting further, I found that it is due to the case sensitive of site name in channelconfiguration file. The CS site created on my desktop is “SiteName” and the site name in channel configuration file is “Sitename”. After changing the site name, the application started working fine.

Even though the fix is simple but would like to keep it in my blog so that fellow developers (like me) will not waste their time much in fixing this simple issue.

Comments
1 Comment »
Categories
Commerce Server 2009, Troubleshoot
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Staging Deployment – Security Considerations
  • Pipeline Editor displays registered custom pipeline components as unknown in 64 Bit version.
  • How commerce server staging works
  • Steps to extend payments in Commerce Server 2009
  • Introduction to Commerce Server Staging
  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
  • Commerce server staging throws Remote authorization failed to server. Ensure the service has access to this server.
  • Updated Commerce Server 2009 template pack for SharePoint 2007 released
  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool

Archives

  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category commerce server commerce server 2007 commerce server manager Commerce Server SP2 commerce server staging discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .