FIX: Web Farm Cache Does Not Refresh Correctly Because CacheManager Does Not Register AppUrl Correctly (817820)



The information in this article applies to:

  • Microsoft Commerce Server 2002 SP1

SYMPTOMS

Cache data refresh operations may occur intermittently or unreliably in a Web farm environment.

If the page uses Secure Sockets Layer (SSL) when the cache is created, the protocol is changed to HTTP instead because Web Distributed Authoring and Versioning (WebDAV) does not work with SSL. However, the port remains the SSL port. This behavior causes Microsoft BizDesk to stop responding during the refresh process.

CAUSE

This problem occurs because the AppUrl property of CacheManager is set to the host name instead of the server computer name in a Web farm. This property is used to register caches. Therefore, a refresh from the BizDesk that uses this URL refreshes only one random server in the farm.

The Discounts cache refreshes immediately when CacheManager is initialized because a cache that is not initialized does not run correctly in a transacted pipeline. However, the site cannot set the AppUrl property before CacheManager initialization routine calculates it. Therefore, the Discounts cache is always registered incorrectly in a Web farm environment.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Commerce Server 2002 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version     Size     File name
   -----------------------------------------------------------------------------
   09-Apr-2003  01:24  4.5.3051.0  318,056  Microsoft.commerceserver.runtime.dll

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

If you do not explicitly set the AppUrl property of CacheManager, CacheManager uses a built-in algorithm to determine the URL of the current site virtual directory. This algorithm uses the host name from the HTTP headers. Therefore, this setting is not reliable.

The hotfix uses the following procedures to determine the AppUrl:
  1. Use the server name instead of the host name.
  2. Change HTTPS to HTTP when the page URL uses SSL.
  3. Change the port to match the unsecurehost port when the page URL uses SSL.
The default setting of the ServerSpecificSiteUrl property uses the local computer name instead of the host from the HTTP header of the first request to the site. Also, the nonsecure port number that is configured for the application in the admin database is used if it is available. If it is not available, port 80 is used.

The ServerSpecificSiteUrl property default value includes the following syntax:

http://computername[:port]/IISApplicationPath

Note The port value is used only if the port for the application is located in the site resources in the Admin database and the port number is not 80. The ServerSpecificSiteUrl property is set to Read/Write (previously it was read-only). If the default setting does not work, you can set this property to override the default. Because the Discount cache is refreshed automatically by the CommerceCacheModule, set the ServerSpecificSiteUrl property in Application_BeginRequest so that the Discount cache picks up the setting.

Additional InformationTo set the SiteSpecificUrl property

REFERENCES

For more information about how to set the ServerSpecificSiteUrl property, visit the following Microsoft Developer Network (MSDN) Web site: For more information about the caching architecture and how to configure cache refeshes in Commerce Server 2002, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:10/11/2005
Keywords:kbHotfixServer kbQFE kbQFE kbfix kbbug KB817820 kbAudDeveloper