Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You may experience problems on your Web server if your Web site is based on the Retail2002 SDK sample site


View products that this article applies to.

Symptoms

If you use a Web site that is based on the Microsoft Commerce Server 2002 Software Development Kit (SDK) Retail2002 sample site in a production environment, you may experience one or more of the following problems:
  • Periodically, under heavy load, shoppers may receive the following error message in the browser:
    Failed to authenticate.AuthManager(CommerceServer): You should call 'AuthManager::Initialize()' method with a valid site-name, before calling any other AuthManager API
  • If the computer that is running Microsoft SQL Server is profiled, you may notice that many of the following queries are being sent to SQL Server.
    SELECT TOP 0 * FROM Sites
  • You may notice that Performance Monitor (PerfMon) statistics indicate that resource utilization for the site increases and that overall responsiveness decreases over time.

↑ Back to the top


Cause

The Retail2002 SDK sample site calls an auth.Refresh sub in the accountmanager:SetAuthenticationTickets method. This call is not necessary. This refresh causes the code to uninitialize the authmanager object and then re-initialize the authmanager object every time that a user logs on to the site and is authenticated.

This behavior uses a lot of resources because this behavior also causes the SiteConfigReadOnly object to re-initialize continually.

↑ Back to the top


Resolution

To resolve the problems that the "Symptoms" section describes, modify the SetAuthenticationTickets method in the Accountmanager.cs file. Comment out the line of code that calls the auth.Refresh sub, and then rebuild the solution. The following sample code has this line commented out.
        public static void SetAuthenticationTickets(string ProfUserID, string AuthUserID)
        {
            try
            {
                ...

                //auth.Refresh(CommerceApplication.SiteName);
            }
            catch(Exception)
    ...

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.

↑ Back to the top


More information

Unlike the Retail solution site, the Retail2002 SDK site is a sample site and is not a fully tested solution site. Microsoft recommends that you do your own performance testing if you want to use code from this sample in your site.

↑ Back to the top


Keywords: KB830802, kbbug, kbcode, kberrmsg, kbfix

↑ Back to the top

Article Info
Article ID : 830802
Revision : 3
Created on : 3/9/2004
Published on : 3/9/2004
Exists online : False
Views : 310