當使用者存取或 Windows 基本商務 Server 2008 中 ISA Server 2006 發佈 SharePoint 網站的錯誤訊息: 「 HTTP 401 未經授權 」

徵狀

當使用者存取在 Microsoft 網際網路安全性] 及 [加速 (ISA) 伺服器 2006,ISA Server 2006 SP1 或 Windows 基本商務 Server 2008 中,便會發行 SharePoint 網站時,使用者可能會收到下列錯誤訊息之一:錯誤訊息 1

HTTP 401 未經授權

錯誤訊息 2

HTTP 500 伺服器拒絕指定的統一資源定位器 (URL)。請連絡伺服器系統管理員。

當下列情況為真時,就會發生這個問題:

  • SharePoint 網頁發佈規則所使用的網頁接聽程式,在 HTML 表單驗證設定。

  • 網頁用戶端將 POST 要求傳送到 SharePoint 網站中。

  • POST 要求的 URL 包含延伸的字元。例如,URL 會包含 é、 相對或 c。

原因

之所以發生這個問題,是因為 ISA 伺服器或 Windows 基本商務 Server 2008 無法剖析包含延伸的字元的 URL。在此情況下,ISA 伺服器或 Windows 基本商務 Server 2008 會拒絕用戶端會傳送 POST 要求。

解決方案

如果要解決這個問題,請依照下列步驟執行。

  1. 套用 Microsoft 知識庫 」 文件 940250 中所述的 hotfix。如需詳細資訊,請按一下下面的文件編號,檢視 「 Microsoft 知識庫 」 中的文:

    940250描述 ISA Server 2006 的 hotfix 套件: 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. 儲存成 Microsoft Visual Basic 指令碼檔案的檔案,使用.vbs 副檔名。使用下列的名稱,例如,儲存檔案:

    EnableKB940248.vbs

  4. 從命令提示字元中,移至您儲存 EnableKB940248.vbs 檔案的位置。

  5. 執行下列命令:

    cscript EnableKB940248.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 產品確實有上述問題。

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×