Web.config 文件并非在服务器场中的所有计算机上都相同 (SharePoint Server)

适用于:yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

规则名称:Web.config 文件并非在服务器场中的所有计算机上都相同。

摘要:如果您的服务器场中有多个前端 Web 服务器而且您对 Web.config 文件进行了手动更改,则您将会遇到前端 Web 服务器无法读取由服务器场中另一台服务器保存的会话状态的问题。

原因:服务器场中的前端 Web 服务器上的 Web.config 文件不相同。

解决方法:确保 Web.config 文件在场中的所有前端 Web 服务器上都完全相同。

  1. 确认执行此过程的用户帐户是 Farm Administrators 组的成员。

  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. 确认执行以下步骤的用户帐户是本地计算机(上一步标明的计算机)上的 Administrators 组的成员。

  4. 登录到发生此事件的服务器。

  5. 通常,Web.config 文件存储在 。C:\inetpub\wwwroot\wss\VirtualDirectories\Port_Number 请注意 Web.config 文件的修改日期。

  6. 在其他出现故障的服务器上重复以上步骤。

  7. 比较这些 Web.config 文件,然后确定正确的 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. 选中“自动修复”复选框,然后单击“保存”