Signalr Orchard信号加密异常

Signalr Orchard信号加密异常,signalr,orchardcms,cryptographicexception,Signalr,Orchardcms,Cryptographicexception,我在Orchard上遇到了这个例外,在windows server 2008上已在IIS上卸载。它在调试环境中运行良好 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 i

我在Orchard上遇到了这个例外,在windows server 2008上已在IIS上卸载。它在调试环境中运行良好

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.

 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: 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.

 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.

 [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.]
 Microsoft.Owin.Host.SystemWeb.Infrastructure.<>c__DisplayClass1.<GetRethrowWithNoStackLossDelegate>b__0(Exception ex) +42
Microsoft.Owin.Host.SystemWeb.CallContextAsyncResult.End(IAsyncResult result) +88
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) +42
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
数据保护操作未成功。这可能是由于没有为当前线程的用户上下文加载用户配置文件造成的,这可能是线程正在模拟的情况。
描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源。
异常详细信息:System.Security.Cryptography.Cryptography异常:数据保护操作未成功。这可能是由于没有为当前线程的用户上下文加载用户配置文件造成的,这可能是线程正在模拟的情况。
源错误:
在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别。
[加密异常:数据保护操作未成功。这可能是由于没有为当前线程的用户上下文加载用户配置文件造成的,这可能是线程模拟时的情况。]
Microsoft.Owin.Host.SystemWeb.Infrastructure.c_uuuDisplayClass1.b_uuu0(异常ex)+42
Microsoft.Owin.Host.SystemWeb.CallContextAsyncResult.End(IAsyncResult结果)+88
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult结果)+42
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+606
System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值&同步完成)+288
同样的问题的解决方法也有描述,但我不知道如何将其应用到果园中

提前感谢

模块有一个

您可以通过添加到加载(ContainerBuilder moduleBuilder)方法行中的CoreModule.cs来解决此问题:

moduleBuilder.RegisterType<MachineKeyProtectedData>()
  .As<IProtectedData>();
moduleBuilder.RegisterType()
.As();