欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Access Control Service The data protection operation was uns

程序员文章站 2022-05-19 15:30:50
...

Q : I am receiving exception with the following message: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the

Q: I am receiving exception with the following message:

The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.

A: Configure IIS to load user profile. To configure IIS to load user profile follow these steps:

  • Open IIS Manager.
  • Find out what AppPool your application is using by selecting your App, right-click on it, and Select Manage Application -> Advanced Settings.
  • After that, on the top left hand side, select Applications Pools, and go ahead and select the App Pool used by your app.
  • Right-click on the App Pool, and select Advanced Settings, Go to the Process Model div and Find the "Load User Profile" Option and set it to true.


After this change, I solved the error above, but I encountered another error which is Application Pool shut down automatically. And I checked the error log, here is the error message:

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.