2013-01-31 41 views
2

我一直在试图让STS​​在Azure网站上工作。所以我使用默认的互联网模板创建了一个MVC4应用程序。然后,我在Azure中创建了一个STS,并使用Identity和Access菜单设置联合安全性。然后,我将[Authorize]标签添加到我的控制器中的一个方法中,并且浏览器被正确地重定向到可以输入LiveId帐户的STS。但后来我得到这个错误MVC4 Azure网站上的STS

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code 

[CryptographicException: 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.] 

[InvalidOperationException: ID1074: A CryptographicException occurred when attempting to encrypt the cookie using the ProtectedData API (see inner exception for details). If you are using IIS 7.5, this could be due to the loadUserProfile setting on the Application Pool being set to false. ] 

我已经尝试了很多事情来得到这个工作,我觉得有一些我很想念的东西。有没有人遇到过这个问题,并有解决方案?

回答