Using application pool identity results in exceptions and event logs

烂漫一生 提交于 2019-12-06 12:27:23

I wasn't able to find the root cause of the issue. However, it seems as though using the same identity for multiple application pools can cause some issues if underlying code relies on resources that belong to that identity.

Changing the application pool setting Load User Profile to True fixed the issue and the event log entries stopped occurring.

I'm going to take a stab at this and say that you are probably not cleaning up resources properly. Microsoft.Win32.RegistryKey objects and System.DirectoryServices.AccountManagement.PrincipalContext are both IDisposable and must be disposed of when not in use anymore.

It's possible those resources may have been getting cleaned up when users' sessions timed out before the change, and they aren't anymore since you switched off impersonation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!