Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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 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.

↑ Back to the top


Status

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

↑ Back to the top


More information

For more information about a similar problem, click the following article number to view the article in the Microsoft Knowledge Base:
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

↑ Back to the top


Keywords: KB940242, kbprb, kbexpertiseinter, kbtshoot, kbarchive, kbnosurvey

↑ Back to the top

Article Info
Article ID : 940242
Revision : 1
Created on : 1/15/2015
Published on : 1/15/2015
Exists online : False
Views : 352