我一直试图让 STS 在 Azure 网站上运行。所以我使用默认的 Internet 模板创建了一个 MVC4 应用程序。然后,我在 Azure 中创建了一个 STS,并使用 Identity and Access 菜单来设置联合安全性。然后,我将 [Authorize] 标记添加到控制器中的方法中,并且浏览器被正确重定向到 STS,我可以在其中输入我的 LiveId 帐户。但后来我得到这个错误
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. ]
我已经尝试了很多方法来让它工作,我认为我缺少一些小东西。有没有人遇到过这个问题并有解决方案?