我有一个使用Windows Identity Foundation的声明感知Web应用程序,在一个服务器上出现问题。我在事件日志中看到了下面显示的错误消息。
Exception information:
Exception type: CryptographicException
Exception message: Key not valid for use in specified state.
at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
at Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Decode(Byte[] encoded)
这个应用程序使用了ADFS v2的非常标准的WIF实现,而没有使用RsaEncryptionCookieTransform。我正在寻找任何关于如何诊断的建议。我迄今为止尝试过以下几个方法:
- 应用程序池正在使用设置为“true”的“Load User Profile”选项的ASP.NET v4.0标识。
- 我删除了C:\Users\ASP.NET v4.0\AppData文件夹,并成功地重新创建了它。
- 我检查了证书私钥的权限,它们是良好的。我还尝试禁用令牌加密,但并没有任何区别。
希望能得到任何建议。