【问题标题】:Error occurred during a cryptographic operation (In Latest version of Thinktecture Identity Server 4.5)加密操作期间发生错误(在 Thinktecture Identity Server 4.5 的最新版本中)
【发布时间】:2012-12-20 09:47:27
【问题描述】:

在创建 SessionCookies(FederatedAuthentication.SessionAuthenticationModule.WriteSessionTokenToCookie(sessionToken)) 时,如果我在配置文件中设置机器密钥设置,我在身份服务器 4.5(最新版本)中出现以下错误“加密操作期间发生错误” , 而 TempData 会在应用程序中丢失。以下是堆栈跟踪详细信息:

异常信息: 异常类型:CryptographicException 异常消息:加密操作期间发生错误。 在 System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func2 func, Byte[] input) at BrockAllen.CookieTempData.CookieTempDataProvider.LoadTempData(ControllerContext controllerContext) in c:\ballen\github\CookieTempData\45\BrockAllen.CookieTempData\CookieTempDataProvider.cs:line 37 at System.Web.Mvc.TempDataDictionary.Load(ControllerContext controllerContext, ITempDataProvider tempDataProvider) at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.Begin(AsyncCallback 回调,对象状态,Int32 超时) 在 System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback 回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate1 endDelegate, Object tag, Int32 timeout) at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.Begin(AsyncCallback 回调,对象状态,Int32 超时) 在 System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback 回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32 超时) 在 System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback 回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate endDelegate,对象标记) 在 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext,AsyncCallback 回调,对象状态) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)。

【问题讨论】:

    标签: session-cookies claims-based-identity least-privilege


    【解决方案1】:

    我在重新安装 Identity Server 后遇到了同样的错误。删除浏览器中的 cookie 对我有用。

    【讨论】:

      【解决方案2】:

      你能详细说明你做了什么导致这个异常吗?在我的测试中设置 效果很好。此外,IdentityServer 问题跟踪器可能更适合处理此类问题:

      https://github.com/thinktecture/Thinktecture.IdentityServer.v2/issues

      【讨论】:

        猜你喜欢
        • 2014-04-21
        • 2021-04-25
        • 1970-01-01
        • 2016-04-11
        • 2014-06-16
        • 1970-01-01
        • 2013-03-28
        • 2016-02-22
        • 2016-07-17
        相关资源
        最近更新 更多