PRB: Changes required when catalog refresh done from BizDesk using FQDN (297109)



The information in this article applies to:

  • Microsoft Commerce Server 2002
  • Microsoft Commerce Server 2000

This article was previously published under Q297109

SYMPTOMS

When you attempt to perform a catalog refresh from the BizDesk Catalog Editor, the refresh does not complete succesfully and you receive the following error message:
An Error occurred while refreshing the catalog cache for:
http://machinename

Details:
Script Error:

Number: 0x80004005
Description: Unspecified Error
Source: msxml2.dll
Help File:
Help Context: 0

CAUSE

The refresh that is performed from the Catalog Editor uses the NetBIOS name of the computer instead of the fully qualified name. The error occurs after you change the nonsecure or secure HostName of the Commerce Server applications from the NetBIOS name to a fully qualified domain name.

RESOLUTION

To resolve this problem, modify the GetmachinebaseURL function in the Global_siteconfig_lib.asp file that is used to return the base URL for the application so that it returns the fully qualified domain name. The value for the site can be hard-coded as shown in the "More Information" section.

STATUS

This behavior is by design.

MORE INFORMATION

To modify the GetmachinebaseURL function, follow these steps:
  1. Modify the GetMachineBaseURL function so that it sets "sWebServerMachine" to the NonSecureHostName that is used for the Commerce site (in most cases the fully qualified domain name (FQDN)). The GetMachineBaseURL function can be found in the following location:

    c:\inetpub\wwwroot\Retail\include\global_siteconfig_lib.asp o

    in the applicable "include" directory of where your commerce site has been setup.
    -----------------------------------------------------------------------------
       ' GetMachineBaseURL
       '
       ' Description:
       '   Returns the base of the URLs for this application specifically for this server.
       ' Notes :
       '   If you wish to use BizDesk production refresh capabilities from a browser outside
       '   the LAN, then this function must be changed so that it returns a computer-specific
       '   URL that works outside the LAN (such as www1.test.com or www2.test.com).
       ' -----------------------------------------------------------------------------
    
    
    Function GetMachineBaseURL()
    Dim iPort, sPort, sWebServerMachine
    
       'sWebServerMachine = GetComputerName()
    sWebServerMachine = "www1.test.com"  ' substitute the fqdn for the machine here.
    ' We assume the port number is the same for all the Web servers on a Webfarm.
    iPort = iGetWebServerPort()
    
    If iPort <> 80 Then
    sPort = ":" & CStr(iPort)
    End If
        GetMachineBaseURL = "http://" 
        GetMachineBaseURL = GetMachineBaseURL & sWebServerMachine
        GetMachineBaseURL = GetMachineBaseURL & sPort
        
        If GetCommerceSiteInstallPoint() = VIRTUAL_DIRECTORY Then
    GetMachineBaseURL = GetMachineBaseURL & "/" & appframework.VirtualDirectory
        End If
    End Function
    					
    NOTE: It may be necessary to delete all entries from the following tables in the Retail_Commerce database and then perform an IISRESET from the command prompt. BizDesk replaces the deleted entries as appropriate:

    • CatalogCache_Virtual_Directory
    • TxVirtual_Directory
    • Virtual_Directory

Steps to Reproduce the Behavior

  1. Modify the nonsecure HostName of both applications that are running under a site to a valid, fully qualified domain name that resolves to the IP address of the Web site on which the site is running.
  2. Perform an IISReset.
  3. In the BizDesk, open the Catalog Editor module, and then attempt to perform a refresh.

Modification Type:MinorLast Reviewed:8/23/2004
Keywords:kberrmsg kbprb KB297109 kbAudDeveloper