在过去的几周里,我的开发工作站(Windows 8.1)上发生了一些事情,这要求我要么运行我的应用程序池并将“加载用户配置文件”设置为 False,要么不运行身份设置为 ApplicationPoolIdentity。如果我要创建一个新的应用程序池,使用 ApplicationPoolIdentity 作为身份并使用 loadUserProfile=true,尝试在浏览器中加载应用程序时会发生以下情况:
- Windows 事件日志中的一些错误(系统和应用程序类型):
- 警告事件 1509 -
Windows cannot copy file \\?\C:\Users\Default\AppData\Local\Microsoft\VSCommon\12.0\SQM\sqmdata-7236-039-00000.sqm to location \\?\C:\Users\[Name of App Pool]\AppData\Local\Microsoft\VSCommon\12.0\SQM\sqmdata-7236-039-00000.sqm. This error may be caused by network problems or insufficient security rights.
- 错误事件 1511 -
Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.
- 另一个 1509 警告
- 错误事件 1500 -
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly. DETAIL - Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
- 5 x 事件 5022 警告 -
The Windows Process Activation Service failed to create a worker process for the application pool '[App Pool Name]'. The data field contains the error number.
- 最后出现错误 5002 -
Application pool '[App Pool Name]' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
- 警告事件 1509 -
- 应用程序池已关闭,如错误 5002 所述
- “Http错误503服务不可用。” 然后在浏览器中看到。任何进一步的请求都会得到相同的满足(这是有道理的,因为应用程序池已关闭)。
我在这里和这里看到了一个常见的“修复” ,基本上说关闭配置文件加载。是的,它使问题消失了,但这并没有解决根本原因。我知道可以使用此配置运行,因为我有一台支持该配置的 Windows 2012 机器。在这种情况下,使用设置为 ApplicationPoolIdentity 和 loadUserProfile=true 的新应用程序池访问应用程序实际上会创建新的用户配置文件(我可以看到配置文件文件夹是在 中创建的C:\Users
)并且应用程序运行愉快。更糟糕的是我知道这个配置在几周前就在问题机器上工作了。我创建了许多应用程序池,它们在C:\Users
文件夹。这些应用程序池现在可以使用 ApplicationPoolIdentity 和 loadUserProfile=true 设置正常工作。只是新的应用程序池拒绝运行和加载用户配置文件。
有没有人对可能发生的事情有任何见解?
编辑:我阅读了最近这篇文章的底部。说设置可以开启有点矛盾,还说:
只有标准应用程序池(DefaultAppPool 和 Classic .NET AppPool)在磁盘上有用户配置文件。如果管理员创建新的应用程序池,则不会创建用户配置文件。
但是,如果需要,您可以通过将 LoadUserProfile 属性设置为“true”来配置 IIS 应用程序池以加载用户配置文件。
我很困惑。