从 Windows Server 2013 升级到 Windows Server 2016(或从 Win 8.1 升级到 Win 10)后 IIS 应用程序池出现错误

从 Windows Server 2013 升级到 Windows Server 2016(或从 Win 8.1 升级到 Win 10)后 IIS 应用程序池出现错误

将我的 Windows 安装从 8.1 升级到 10 后,许多应用程序池无法启动,并在事件查看器中显示以下条目:

应用:

Source: IIS-W3SVC-WP
Event ID: 2307
The worker process for application pool '<app pool name>' encountered an error 'Cannot read configuration file' trying to read configuration data from file '\\?\<EMPTY>', line number '0'. The data field contains the error code.

系统:

Source: WAS
Event ID: 5189
The Windows Process Activation Service failed to generate an application pool config file for application pool '<app pool name>'. The error type is '5'. To resolve this issue, please ensure that the applicationhost.config file is correct and recommit the last configuration changes made. The data field contains the error number.

Source: WAS
Event ID: 5203
A process serving application pool '<app pool name>' reported a failure trying to read configuration during startup. The process id was '4120'.  Please check the Application Event Log for further event messages logged by the worker process on the specific error.  The data field contains the error number.

我发现很多人说要重新安装 IIS/WAS,但即使这样做了,错误仍然存​​在。

出于某种原因,用另一个名称重新创建应用程序池可以修复错误,但我不想一直这样。将应用程序池重命名为原始名称后,它再次开始失败。

答案1

使用优秀的进程监视器分析了哪些文件Windows 进程激活服务尝试读取/创建时,我发现这些文件和目录C:\inetpub\temp\apppools可能被 Windows 升级过程弄乱了。我删除了这些旧文件和目录并重新启动了应用程序池。

现在一切正常!

相关内容