Microsoft KB Archive/817820

= FIX: Web Farm Cache Does Not Refresh Correctly Because CacheManager Does Not Register AppUrl Correctly =

Article ID: 817820

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft Commerce Server 2002 Service Pack 1

-



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. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

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:// [: ]/

Note The  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

