将Windows安装从8.1升级到10后,许多App Pool无法启动,在事件查看器中显示以下条目:
应用:
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,但即使这样做,错误仍然存在。
出于某种原因,用另一个名字重新创build应用程序池可以解决这个错误,但是我不想这样做。 将App Pool重命名为原始名称后,又开始失败。
在使用优秀的进程监视器来分析Windows进程激活服务试图读取/创build什么文件后,我发现这些文件和目录在C:\inetpub\temp\apppools中,Windows升级过程可能会搞砸了。 我删除了这些旧的文件和目录,并重新启动了应用程序池。
现在一切正常!