我在Windows Server 2008上使用IIS 7.5托管我的Web应用程序, 我有2个Web应用程序: 1.第一个是核心sso(Single Sign-on)服务与登录页面。 2.另一个Web应用程序托管在使用第一个应用程序的同一个Web服务器上。WIF RTM发生奇怪的错误,在复位后发生IIS
我使用WIF RTM来实现SSO,
通常,这是没有任何问题运行良好,用户可以登录扔SSO和重定向回起始页。 但是当我首先登录扔SSO,然后重新启动IIS,如果我回来的第二个应用程序,并刷新页面,我得到了以下错误:
Server Error in '/' Application. Key not valid for use in specified state. Description: 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.
Exception Details: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[CryptographicException: Key not valid for use in specified state. ]
System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) +425
Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Decode(Byte[] encoded) +59[InvalidOperationException: ID1073: A CryptographicException occurred when attempting to decrypt 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. ] Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Decode(Byte[] encoded) +151
Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ApplyTransforms(Byte[] cookie, Boolean outbound) +109
Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver) +634
Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken(Byte[] token, SecurityTokenResolver tokenResolver) +105
Microsoft.IdentityModel.Web.SessionAuthenticationModule.ReadSessionTokenFromCookie(Byte[] sessionCookie) +239
Microsoft.IdentityModel.Web.SessionAuthenticationModule.TryReadSessionTokenFromCookie(SessionSecurityToken& sessionToken) +59
Microsoft.IdentityModel.Web.SessionAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs) +52
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75________________________________________ Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
用户会话中使用SQLServer的会话存储模式,我正在使用一个特殊的数据库。
我已经尝试了很多,我无法在本地计算机(Windows7)上重新处理此问题。 有没有人有类似的经历?你能告诉我如何解决这个问题吗?
我没有验证这是否会解决这个问题,因为这已经很长一段时间了,我不在该项目中,任何人都遇到了这个问题,请添加您的评论。谢谢! – 2012-09-06 05:24:13