若要取得驗證嘗試失敗的詳細及確切資訊,您必須在 SharePoint ULS 記錄檔中尋找。 這些記錄檔儲存在 %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\15\LOGS 資料夾中。
您可以手動在 ULS 記錄檔中尋找失敗的驗證嘗試,或是使用 ULS 記錄檔檢視器來尋找。
手動尋找失敗的驗證嘗試
向使用者取得產生失敗驗證嘗試的使用者帳戶名稱。
在執行 SharePoint Server 或 SharePoint Foundation 的伺服器上,尋找 %CommonProgramFiles% \Microsoft Shared\Web Server Extensions\16\LOGS 或 %CommonProgramFiles% \Microsoft Shared\Web Server Extensions\15\LOGS 資料夾。
若要使用 ULS 檢視器,請從 ULS 檢視器下載,並儲存至執行 SharePoint Server 或 SharePoint Foundation 之伺服器上的資料夾。 安裝之後,遵循下列步驟來尋找失敗的驗證嘗試。
使用 ULS 檢視器來尋找失敗的驗證嘗試
在執行 SharePoint Server 或 SharePoint Foundation 的伺服器上,從儲存所在的資料夾按兩下 Ulsviewer。
在 [ULS 檢視器] 中,按一下 [檔案],指向 [開啟來源],然後按一下 [ULS]。
在 [設定 ULS 運行時間摘要] 對話框中,確認 [使用默認記錄檔目錄的 ULS 摘要] 中指定了 %CommonProgramFiles% \Common Files\Microsoft Shared\Web Server Extensions\16\LOGS 資料夾或 \Common Files\Microsoft Shared\Web Server Extensions\15\LOGS 資料夾。 If not, click Use directory location for real-time feeds and specify the %CommonProgramFiles% \Microsoft Shared\Web Server Extensions\16\LOGS folder or \Microsoft Shared\Web Server Extensions\15\LOGS folder in Log file location.
針對 %CommonProgramFiles%,請將 CommonProgramFiles 環境變數的值替換為執行 SharePoint Server 或 SharePoint Foundation 的伺服器。 例如,如果該位置為 C 磁碟機,則 %CommonProgramFiles% 設為 C:\Program Files\Common Files。
若要判斷如何設定 Web 應用程式或區域,以支援一或多個宣告驗證方法,請使用 SharePoint 管理中心網站。
確認 Web 應用程式或區域的驗證設定
從管理中心的快速啟動上,按一下 [應用程式管理],然後按一下 [管理 Web 應用程式]。
按一下使用者嘗試存取之 Web 應用程式的名稱,然後在功能區的 [安全性] 群組中,按一下 [驗證提供者]。
在驗證提供者清單中,按一下適當的區域 (例如 [預設])。
在 [ 編輯驗證] 對話方塊的 [ 宣告驗證類型 ] 區段中,確認宣告驗證的設定。
For Windows claims authentication, verify that Enable Windows Authentication and Integrated Windows authentication are selected, and that either NTLM or Negotiate (Kerberos) is selected as needed. Select Basic authentication if it is needed.
For forms-based authentication, verify that Enable Forms Based Authentication (FBA) is selected. Verify the values in ASP.NET Membership provider name and ASP.NET Role manager name. These values must match the membership provider and role values that you configured in your web.config files for the the SharePoint Central Administration website, web application, and SharePoint Web Services\SecurityTokenServiceApplication. For more information, see Configure forms-based authentication for a claims-based web application in SharePoint Server.
In the Sign In Page URL section, verify the option for the sign-in page. For a default sign-in page, Default Sign In Page should be selected. For a custom sign-in-page, verify the specified URL of the custom sign-in page. To verify it, copy the URL, and then attempt to access it using a web browser.
使用者發出驗證嘗試的來源電腦是主控 SharePoint Web 應用程式之伺服器的相同網域成員,或是主控伺服器所信任之網域的成員。
使用者發出驗證嘗試的來源電腦已登入其 Active Directory 網域服務 (AD DS) 網域。 在網頁用戶端電腦上的命令提示字元或 SharePoint 管理命令介面中,輸入 nltest /dsgetdc: /force ,以確定其可存取網域控制站。 如果沒有列出任何網域控制站,請疑難排解網頁用戶端電腦與 AD DS 網域控制站之間缺乏探索能力及連線能力的問題。
執行 SharePoint Server 或 SharePoint Foundation 的伺服器已登入其 AD DS 網域。 在執行 SharePoint Server 或 SharePoint Foundation 之伺服器上的命令提示字元或 SharePoint 管理命令介面 中,鍵入 nltest /dsgetdc: /force ,以確定其可以存取網域控制站。 如果沒有列出任何網域控制站,請對 SharePoint Server 或 SharePoint Foundation 之伺服器與 AD DS 網域控制站之間缺乏探索能力及連線能力的問題,進行疑難排解。
若為表單型驗證,請確認下列項目:
所設定之 ASP.NET 成員資格和角色提供者的使用者認證正確。
網路上有主控 ASP.NET 成員資格和角色提供者的系統可供使用。
自訂登入頁面正確地收集和傳達使用者的認證。 若要測試是否正確,請將 Web 應用程式設定為暫時使用預設登入頁面,並確認運作正常。
若為 SAML 型宣告驗證,請確認下列項目:
所設定之身分識別提供者的使用者認證正確。
網路上有做為同盟提供者 (例如 AD FS) 和身分識別提供者 (例如 AD DS 或協力廠商身分識別提供者) 的系統可供使用。
自訂登入頁面正確地收集和傳達使用者的認證。 若要測試是否正確,請將 Web 應用程式設定為暫時使用預設登入頁面,並確認運作正常。
使用網路流量工具 (例如 Network Monitor 3.4) 來擷取及分析網頁用戶端電腦、執行 SharePoint Server 或 SharePoint Foundation 的伺服器,以及 SharePoint Server 或 SharePoint Foundation 所仰賴的系統之間的流量,以進行宣告驗證。