Archive for January 2009

This is old post but thought of sharing with all of you. Sometimes, after updating user profile properties and try to retrieve through commerce server API, you will get following error.

 

Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileSystemException was unhandled by user code
Message="Failed to retrieve profile."
Source="Microsoft.CommerceServer.Runtime"
StackTrace:
at Microsoft.CommerceServer.Runtime.Profiles.Profile..ctor(ProfileContext profileService, String keyName, String keyValue, String profileType)
at Microsoft.CommerceServer.Runtime.Profiles.ProfileContext.GetProfile(String keyName, String keyValue, String profileType)
at Microsoft.CommerceServer.Runtime.Profiles.UpmMembershipProvider.GetUser(String username, Boolean userIsOnline)
at System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline)
at System.Web.Security.Membership.GetUser(String username)
at CommerceSite.StandardLayout.OnInit(EventArgs e) in c:\Inetpub\wwwroot\StarterSite\StandardLayout.master.cs:line 52
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The inner exception says – “A duplicate value for unique key member GeneralInfo.email_address found while building indices for profile UserObject. Check the underlying store for uniqueness of the property

This problem occurs when the user profile cache has not expired on Web server. Sometimes, a user cannot log on to a Commerce Server 2007 site until the profile cache entries expire on all Web server.

Microsoft has release patch for this fix and you can download it from the below location.
Commerce SErver 2007 SP1 Hotefix – KB949967 – http://support.microsoft.com/kb/949967

Note: After applying this fix, you need to restart your machine.

Related Articles


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


Follow me on Google+
Couldn't get data from google+
Sign up for Newsletter