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.
If you receive this error from one of your application, you resolve the problem in this way:
- Open IIS Manager
- Select Applications Pools, and go ahead and select the App Pool used by your app
- Right-click on it, and select Advanced Settings, Go to the Process Model Section and Find the “Load User Profile” Option and set it to True