Web.config 檔案在伺服器陣列中的所有機器上並不相同 (SharePoint Server)

適用于:yes-img-132013 yes-img-16 2016yes-img-192019 yes-img-se訂閱版本 no-img-sopMicrosoft 365 中的 SharePoint

規則名稱: 伺服器陣列中所有機器的 Web.config 檔案皆不相同。

摘要: 如果在伺服器陣列中有多部前端網頁伺服器,並且已手動變更 Web.config 檔案,將會發生前端網頁伺服器無法讀取伺服器陣列中其他伺服器儲存的工作階段狀態。

原因:伺服器陣列中前端網頁伺服器上的 Web.config 檔案皆不相同。

解決方案:請確認伺服器陣列中所有前端網頁伺服器上的 Web.config 檔案皆相同。

  1. 確認執行此程序的使用者帳戶是伺服器陣列管理員群組的成員。

  2. Identify the server on which this event occurs. On the SharePoint Central Administration website, 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. 確認執行下列步驟的使用者帳戶是您在先前步驟中識別之本機電腦上系統管理員群組的成員。

  4. 登入發生此事件的伺服器。

  5. Web.config檔案通常會儲存在 C:\inetpub\wwwroot\wss\VirtualDirectories\Port_Number 。 請注意 Web.config 檔案的修改日期。

  6. 請在其他失敗的伺服器上重複上述步驟。

  7. 請比較這些 Web.config 檔案並決定正確的檔案。 若要檢視 Web.config 檔案的內容,請執行下列動作:

  8. 在 [伺服器管理員] 中,按一下 [工具],然後按一下 [Internet Information Services (IIS) 管理員]

  9. 在 Internet Information Services 管理主控台的 [連線] 窗格中,依序展開伺服器名稱的樹狀檢視及 [網站],然後按一下您要檢視其 Web.config 檔案設定的網站。

  10. 在網站首頁上,切換至 [功能檢視],然後在 [管理] 區段中,按兩下 [設定編輯器]

  11. 在 [區段] 清單中,選取您要檢視其 Web.config 檔案設定的區段。

  12. 在每個失敗伺服器上刪除不正確的 Web.config 檔案,然後複製並貼上正確的 Web.config 檔案。

By default, the Repair Automatically option is enabled for this rule. You can restore the default setting for this rule by doing the following:

還原預設設定

  1. 在管理中心按一下 [監視]

  2. 在 [監視] 頁面上,按一下 [狀況分析器] 區段中的 [檢閱規則定義]

  3. 在 [狀況分析規則定義] – [所有規則] 頁面的 [類別:設定] 區段中,按一下規則名稱。

  4. 在 [狀況分析器規則定義] 對話方塊中,按一下 [編輯項目]

  5. 選取 [自動修復] 核取方塊,然後按一下 [儲存]