A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

ProfileProvider question in regards to Commerce R2

Vote:
 

In the enotaca sample site, the site uses the SqlServerProfileProvider, but it is configured with automaticSaveEnabled=true, which means that every single page view will result in a call to a stored procedure which will perform a number of selects and potientially an update to the database. This is bad for performance, so i was wondering if this setting is needed for Commerce to function properly or if i can disable it?

#63817
Nov 30, 2012 10:41
Vote:
 

I think it could work fine if you set the automaticSaveEnabled to false. Or you can intercept this in the Global.asax:

void Profile_ProfileAutoSaving(object sender, ProfileAutoSaveEventArgs e)
{ e.ContinueWithProfileAutoSave=false;}

In ProfileModule ( EPiServer.Business.Commerce ), you could also see that it intercepts this event if the HttpContext.Items["CancelProfileAutoSave"] is true.

if ((e.Context.Items["CancelProfileAutoSave"] != null) && ((bool) e.Context.Items["CancelProfileAutoSave"]))
{
e.ContinueWithProfileAutoSave = false;
}

#63860
Dec 03, 2012 10:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.