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.

Related Articles


If you like this post, please click on our sponsor advertisement.


Leave a Reply

Follow me on Google+
Add to circles

In 0 people's circles

Sign up for Newsletter