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,

在iis7.0布署网站后运行的错误,大致意思是:数据保护操作是不成功的。可能是由于没有当前线程的用户加载用户配置文件的导致

解决办法:

先为自己的网站新建一个应用程序池,然后新建的应用程序池上右键->高级设置->进程模型-加载用户配置文件,将其设置成true就可以了

原文地址:https://www.cnblogs.com/songling/p/2801360.html