Microsoft KB Archive/940242

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

Article ID: 940242

Article Last Modified on 8/14/2007

-

APPLIES TO


 * Microsoft Internet Security and Acceleration Server 2006 Standard Edition
 * Microsoft Internet Security and Acceleration Server 2006 Enterprise Edition

-



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

  Start Notepad, and then paste the following script into a new document. Const SE_VPS_GUID = &quot;{143F5698-103B-12D4-FF34-1F34767DEabc}&quot; Const SE_VPS_NAME = &quot;CookieUserData&quot; Const SE_VPS_VALUE = &quot; domain=.site.com;&quot;

'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(&quot;FPC.Root&quot;)

' 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 &quot;The policy rule specified could not be found.&quot; 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 &quot;New VendorSet added... &quot; & VendorSet.Name

Else WScript.Echo &quot;Existing VendorSet found... value- &quot; & 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 &quot;Done!&quot;

Else WScript.Echo &quot;The policy rule specified is not a Web publishing rule.&quot; End If   End If

End Sub

Sub Usage WScript.Echo &quot;Usage:&quot; & VbCrLf _ & &quot; &quot; & WScript.ScriptName & &quot; RuleName&quot; & VbCrLf _ & &quot;&quot; & VbCrLf _ & &quot;   RuleName - Name of the Web publishing rule&quot; WScript.Quit End Sub

Sub CheckError

If Err.Number <> 0 Then WScript.Echo &quot;An error occurred: 0x&quot; & Hex(Err.Number) & &quot; &quot; & Err.Description Err.Clear End If

End Sub   In the following text, replace .site.com; with the domain name of the Web site: Const SE_VPS_VALUE = &quot; domain=.site.com;&quot; 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 = &quot; domain=.contoso.com;&quot;  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. 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

Note Replace the  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 &quot;Applies to&quot; section.

<div class="moreinformation_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 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

Keywords: kbtshoot kbexpertiseinter kbprb KB940242

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.