当用户访问在 ISA Server 2006 或 Windows 基本业务服务器 2008 中发布的 SharePoint 网站时出现错误消息:"HTTP 401 未授权"


症状


当用户访问在 Microsoft Internet 安全和加速 (ISA) 服务器 2006、ISA 服务器 2006 SP1 或 Windows 基本业务服务器 2008 中发布的 SharePoint 网站时,用户可能会收到以下错误消息之一:错误消息 1
HTTP 401 未经授权
错误消息 2
HTTP 500 服务器拒绝指定的统一资源定位器 (URL)。请与服务器管理员联系。
当符合下列条件时,可能会出现此问题:
  • 在 SharePoint Web 发布规则使用的 Web 侦听器中,配置了 HTML 表单身份验证。
  • Web 客户端向 SharePoint 网站发送 POST 请求。
  • POST 请求的 URL 包含扩展字符。例如,URL 包含 *、*或 *。

原因


出现此问题是因为 ISA 服务器或 Windows 基本业务服务器 2008 无法解析包含扩展字符的 URL。在这种情况下,ISA 服务器或 Windows 基本业务服务器 2008 拒绝客户端发送的 POST 请求。

解决方案


要解决此问题,请按照以下步骤操作:
  1. 应用 Microsoft 知识库文章 940250 中描述的修补程序。有关详细信息,请单击以下文章编号以查看 Microsoft 知识库中的文章:
    940250 ISA 服务器 2006 修补程序包说明:2007 年 7 月 16 日
  2. 将以下脚本复制到记事本:注意要在 ISA Server 2006 中解决此问题,请使用以下脚本。您不必在本文中为 ISA Server 2006 SP1 应用修补程序,但必须使用该脚本。
    Const SE_VPS_GUID = "{143F5698-103B-12D4-FF34-1F34767DEabc}"Const SE_VPS_NAME = "CookieFilterDecodeUEncoding"Const SE_VPS_VALUE = trueSub SetValue()    ' Create the root object.    Dim root  ' The FPCLib.FPC root object    Set root = CreateObject("FPC.Root")    'Declare the other objects that are needed.    Dim array       ' An FPCArray object    Dim VendorSets  ' An FPCVendorParametersSets collection    Dim VendorSet   ' An FPCVendorParametersSet object    ' Get references to the array object    ' and to the network rules collection.    Set array = root.GetContainingArray    Set VendorSets = array.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    if VendorSet.Value(SE_VPS_NAME) <> SE_VPS_VALUE Then        Err.Clear        VendorSet.Value(SE_VPS_NAME) = SE_VPS_VALUE        If Err.Number <> 0 Then            CheckError        Else            VendorSets.Save false, true            CheckError            If Err.Number = 0 Then                WScript.Echo "Done with " & SE_VPS_NAME & ", saved!"            End If        End If    Else        WScript.Echo "Done with " & SE_VPS_NAME & ", no change!"    End IfEnd SubSub CheckError()    If Err.Number <> 0 Then        WScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description        Err.Clear    End IfEnd SubSetValue
  3. 使用 .vbs 文件名扩展名将文件另存为 Microsoft Visual Basic 脚本文件。例如,使用以下名称保存文件:
    EnableKB940248.vbs
  4. 在命令提示符下,移动到保存 EnableKB940248.vbs 文件的位置。
  5. 运行以下命令:
    cscript 启用KB940248.vbs
备注执行这些步骤后,只有 URL 的查询部分可以包含扩展字符。查询部分遵循 URL 中的问号 (?)。即使在使用此分辨率后,URL 中的问号之前的部分也不能包含扩展字符。如果要删除在步骤 5 中运行脚本时所做的更改,请运行以下脚本:
Const SE_VPS_GUID = "{143F5698-103B-12D4-FF34-1F34767DEabc}"Const SE_VPS_NAME = "CookieFilterDecodeUEncoding"Const SE_VPS_VALUE = FalseSub SetValue()' Create the root object.Dim root ' The FPCLib.FPC root objectroot = CreateObject("FPC.Root")'Declare the other objects that are needed.Dim array ' An FPCArray objectDim VendorSets ' An FPCVendorParametersSets collectionDim VendorSet ' An FPCVendorParametersSet object' Get references to the array object' and to the network rules collection.array = root.GetContainingArrayVendorSets = array.VendorParametersSetsOn Error Resume NextVendorSet = VendorSets.Item(SE_VPS_GUID)If Err.Number <> 0 ThenErr.Clear()' Add the itemVendorSet = VendorSets.Add(SE_VPS_GUID)CheckError()WScript.Echo("New VendorSet added... " & VendorSet.Name)ElseWScript.Echo("Existing VendorSet found... value- " & VendorSet.Value(SE_VPS_NAME))End IfIf VendorSet.Value(SE_VPS_NAME) <> SE_VPS_VALUE ThenErr.Clear()VendorSet.Value(SE_VPS_NAME) = SE_VPS_VALUEIf Err.Number <> 0 ThenCheckError()ElseVendorSets.Save(False, True)CheckError()If Err.Number = 0 ThenWScript.Echo("Done with " & SE_VPS_NAME & ", saved!")End IfEnd IfElseWScript.Echo("Done with " & SE_VPS_NAME & ", no change!")End IfEnd SubSub CheckError()If Err.Number <> 0 ThenWScript.Echo("An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description)Err.Clear()End IfEnd SubSetValue Change to:[INSERT CORRECTION]Const SE_VPS_GUID = "{143F5698-103B-12D4-FF34-1F34767DEabc}"Const SE_VPS_NAME = "CookieFilterDecodeUEncoding"Const SE_VPS_VALUE = falseSub SetValue()' Create the root object.Dim root ' The FPCLib.FPC root objectSet root = CreateObject("FPC.Root")'Declare the other objects that are needed.Dim array ' An FPCArray objectDim VendorSets ' An FPCVendorParametersSets collectionDim VendorSet ' An FPCVendorParametersSet object' Get references to the array object' and to the network rules collection.Set array = root.GetContainingArraySet VendorSets = array.VendorParametersSetsOn Error Resume NextSet VendorSet = VendorSets.Item( SE_VPS_GUID )If Err.Number <> 0 ThenErr.Clear' Add the itemSet VendorSet = VendorSets.Add( SE_VPS_GUID )CheckErrorWScript.Echo "New VendorSet added... " & VendorSet.NameElseWScript.Echo "Existing VendorSet found... value- " & VendorSet.Value(SE_VPS_NAME)End Ifif VendorSet.Value(SE_VPS_NAME) <> SE_VPS_VALUE ThenErr.ClearVendorSet.Value(SE_VPS_NAME) = SE_VPS_VALUEIf Err.Number <> 0 ThenCheckErrorElseVendorSets.Save false, trueCheckErrorIf Err.Number = 0 ThenWScript.Echo "Done with " & SE_VPS_NAME & ", saved!"End IfEnd IfElseWScript.Echo "Done with " & SE_VPS_NAME & ", no change!"End IfEnd SubSub CheckError()If Err.Number <> 0 ThenWScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.DescriptionErr.ClearEnd IfEnd SubSetValue

状态


Microsoft 已确认这是在“适用范围”部分中列出的 Microsoft 产品存在的问题。