Microsoft KB Archive/830802

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

Article ID: 830802

Article Last Modified on 3/9/2004

-

APPLIES TO


 * Microsoft Commerce Server 2002 Service Pack 1

-





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.



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.



RESOLUTION
To resolve the problems that the &quot;Symptoms&quot; 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) ...



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.



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.

Keywords: kberrmsg kbbug kbfix kbcode KB830802

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.