無法使用 Security Token Service (SharePoint Server)The Security Token Service is not available (SharePoint Server)

摘要: 了解如何在 SharePoint Server 2016 和 SharePoint 2013 解決 SharePoint Health Analyzer 規則「Security Token Service 無法使用」。Summary: Learn how to resolve the SharePoint Health Analyzer rule "The Security Token Service is not available", in SharePoint Server 2016 and SharePoint 2013.

規則名稱: 無法使用 Security Token Service。Rule Name: The Security Token Service is not available.

摘要: Security Token Service 不會核發 Token。Summary: The Security Token Service is not issuing tokens.

原因: 服務可能發生問題或無法使用,或當您部署自訂宣告提供者時,有部分組件遺失。Cause: The service could be malfunctioning or in a bad state, or some assemblies are missing when you deploy the custom claims provider.

解決方案:重新啟動 Security Token Service 應用程式集區。Resolution: Restart the Security Token Service application pool.

  1. 確認執行此程序的使用者帳戶是伺服器陣列管理員群組的成員。Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. 識別發生此事件的伺服器。在 SharePoint 管理中心網站上,按一下 [監視]**** 區段中的 [檢閱問題與方案]*,然後在 [失敗的伺服器]* 欄中尋找伺服器的名稱。如果伺服器陣列中有多部失敗的伺服器,則必須在每部失敗的伺服器上重複下列步驟。Identify the server on which this event occurs. On the Central Administration Web site, in the Monitoring section, click Review problems and solutions, and then find the name of the server in the Failing Servers column. If there are multiple failing servers in a server farm, you must repeat the following steps on each failing server.

  3. 確認執行下列步驟的使用者帳戶是您在先前步驟中識別之本機電腦上系統管理員群組的成員。Verify that the user account that is performing the following steps is a member of the Administrators group on the local computer that you identified in the previous step.

  4. 登入發生此事件的伺服器。Log on to the server on which this event occurs.

  5. 開啟 [伺服器管理員]*,按一下 [工具],然後按一下 [Internet Information Services (IIS) 管理員]Open *Server Manager, click Tools, and then click Internet Information Services (IIS) Manager.

  6. 在 Internet Information Services 管理主控台的 [連線]**** 窗格中,展開樹狀檢視,然後按一下 [應用程式集區]*In the Internet Information Services management console, in the *Connections pane, expand the tree view, and then click Application Pools.

  7. 在 [應用程式集區]**** 清單中,以滑鼠右鍵按一下 SecurityTokenServiceApplicationPool,然後按一下 [啟動]*。如果應用程式集區已啟動,按一下 [停止],然後在 [動作]*** 窗格中,按一下 [啟動]**** 以重新啟動。In the Application Pools list, right-click SecurityTokenServiceApplicationPool, and then click Start. If the application pool is started already, click Stop and then, in the Action pane, click Start to restart it.

解決方案:手動將遺失的組件安裝到全域組件快取 (GAC)。Resolution: Install the missing assemblies into the global assembly cache (GAC) manually.

  1. 檢查所有伺服器上的事件記錄檔和 ULS 記錄檔,找出自訂宣告提供者中遺失的組件。Check the event logs and ULS logs on all servers to find out which assemblies of the custom claims provider are missing.

  2. 手動將遺失的組件安裝到全域組件快取。如需更多資訊,請參閱<HOW TO:將組件安裝到全域組件快取Install the missing assemblies into the global assembly cache manually. For more information, see How to: Install an Assembly into the Global Assembly Cache.