Article ID: 940242 - Last Review: August 14, 2007 - Revision: 1.0

ISA Server 2006 forwards requests to an incorrect Web server when a client computer accesses Web sites that have different host names in the same session

Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • In Microsoft Internet Security and Acceleration (ISA) Server 2006, you create a Web farm that contains multiple Web servers.
  • You create multiple Web publishing rules to publish multiple Web sites by using the same Web farm.
  • In the Web publishing rules, the load balance mechanism is set to Cookie based.
In this scenario, ISA Server forwards requests to an incorrect Web server. When a client computer accesses Web sites that have different host names in the same session, ISA Server does not forward the request to the same Web server.

CAUSE

This problem occurs when the Web browser does not send a Web Publishing Load Balancing (WPLB) cookie to ISA Server.

By default, a Web browser does not use a cookie from one site in a request that it sends to another site. Therefore, the request that is sent to ISA Server does not contain the WPLB cookie. In this situation, ISA Server may select a different server from the Web farm to handle the request.

RESOLUTION

  1. Apply hotfix 940250. For more information about this hotfix, click the following article number to view the article in the Microsoft Knowledge Base:
    940250  (http://support.microsoft.com/kb/940250/ ) Description of the ISA Server 2006 hotfix package: July 16, 2007
  2. Start Notepad, and then paste the following script into a new document.
    Const SE_VPS_GUID = "{143F5698-103B-12D4-FF34-1F34767DEabc}"
    Const SE_VPS_NAME = "CookieUserData"
    Const SE_VPS_VALUE = " domain=.site.com;"
    
    
    'Define the constants needed
    const Error_FileNotFound = &H80070002
    Const fpcPolicyWebPublishing = 2
    
    Main(WScript.Arguments)
    
    Sub Main(args)
    
        If(args.Count = 1) Then
            SetWPLBcookieUserData args(0)
        Else
            Usage()
        End If
    End Sub
    
    Sub SetWPLBcookieUserData(ruleName)
    
        ' Create the root object.
        Dim root  ' The FPCLib.FPC root object
        Set root = CreateObject("FPC.Root")
    
        ' Declare the other objects needed.
        Dim isaArray        ' An FPCArray object
        Dim rule            ' An FPCPolicyRule object
    
        ' Get a reference to the array object.
        Set isaArray = root.GetContainingArray()
    
        ' Get a reference to the policy rule specified.
        On Error Resume Next
        Set rule = isaArray.ArrayPolicy.PolicyRules.Item(ruleName)
        If Err.Number = Error_FileNotFound Then
            WScript.Echo "The policy rule specified could not be found."
        Else
            Err.Clear
            On Error GoTo 0
            If rule.Type = fpcPolicyWebPublishing Then
    
                Dim VendorSets  ' An FPCVendorParametersSets collection
                Dim VendorSet   ' An FPCVendorParametersSet object
    
                Set VendorSets = rule.VendorParametersSets
    
                On Error Resume Next
                Set VendorSet = VendorSets.Item( SE_VPS_GUID )
    
                If Err.Number <> 0 Then
                    Err.Clear
    
                    ' Add the item
                    Set VendorSet = VendorSets.Add( SE_VPS_GUID )
                    CheckError
                    WScript.Echo "New VendorSet added... " & VendorSet.Name
    
                Else
                    WScript.Echo "Existing VendorSet found... value- " &  VendorSet.Value(SE_VPS_NAME)
                End If
    
                Err.Clear
                VendorSet.Value(SE_VPS_NAME) = SE_VPS_VALUE
    
                If Err.Number <> 0 Then
                    CheckError
                End If
    
                rule.Save
                WScript.Echo "Done!"
    
            Else
                WScript.Echo "The policy rule specified is not a Web publishing rule."
            End If
        End If
    
    End Sub
    
    Sub Usage()
        WScript.Echo "Usage:" & VbCrLf _
            & "  " & WScript.ScriptName & " RuleName" & VbCrLf _
            & "" & VbCrLf _
            & "    RuleName - Name of the Web publishing rule"
        WScript.Quit
    End Sub
    
    
    Sub CheckError()
    
        If Err.Number <> 0 Then
            WScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description
            Err.Clear
        End If
    
    End Sub
    
    
  3. In the following text, replace .site.com; with the domain name of the Web site:
    Const SE_VPS_VALUE = " domain=.site.com;"
    Note Make sure that you include the semicolon at the end of the domain name. For example, if the same publishing rule allows for traffic to the hr.contoso.com site and to the finance.contoso.com site, and if the Web client sends requests to both sites, the whole line should resemble the following:
    Const SE_VPS_VALUE = " domain=.contoso.com;"
  4. Save the file by using the .vbs file name extension. For example, use the following name to save the file:
    wplbCookieUserData.vbs
    Note Microsoft Visual Basic script files use the .vbs file name extension.
  5. At a command prompt, move to the location where you saved the .vbs file, type the following command, and then press ENTER:
    cscript wplbCookieUserData.vbs RuleName
    Note Replace the RuleName placeholder with the name of the Web publishing rule.
Note You can use this script to add any user data to the WPLB cookie. To do this, replace the value of the SE_VPS_VALUE constant with the user data that you want to add. Make sure that you end each field in the cookie with a semicolon.

STATUS

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

MORE INFORMATION

For more information about a similar problem, click the following article number to view the article in the Microsoft Knowledge Base:
937841  (http://support.microsoft.com/kb/937841/ ) ISA Server 2006 forwards requests to an incorrect Web server when a client computer accesses Web sites that have different URLs in the same session

APPLIES TO
  • Microsoft Internet Security and Acceleration Server 2006 Standard Edition
  • Microsoft Internet Security and Acceleration Server 2006 Enterprise Edition
Keywords: 
kbtshoot kbexpertiseinter kbprb KB940242
 

Article Translations