azure中的Virto Commerce加密异常

azure中的Virto Commerce加密异常,azure,azure-deployment,virtocommerce,Azure,Azure Deployment,Virtocommerce,在努力将virto commerce成功部署到Azure之后,在为新用户激活电子邮件确认之后,我一直遇到加密异常: 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

在努力将virto commerce成功部署到Azure之后,在为新用户激活电子邮件确认之后,我一直遇到加密异常:

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.

at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
   at VirtoCommerce.Web.Client.Providers.CookieTempDataProvider.Protect(Byte[] data) in c:\Users\Tiago\Documents\xpmarketplace\src\Extensions\Client\CommerceWebClient\Providers\CookieTempDataProvider.cs:line 91
   at VirtoCommerce.Web.Client.Providers.CookieTempDataProvider.SaveTempData(ControllerContext controllerContext, IDictionary`2 values) in c:\Users\Tiago\Documents\xpmarketplace\src\Extensions\Client\CommerceWebClient\Providers\CookieTempDataProvider.cs:line 28
   at System.Web.Mvc.TempDataDictionary.Save(ControllerContext controllerContext, ITempDataProvider tempDataProvider)
   at System.Web.Mvc.Controller.PossiblySaveTempData()
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
   at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)
数据保护操作未成功。这可能是由于没有为当前线程的用户上下文加载用户配置文件造成的,这可能是线程正在模拟的情况。
位于System.Security.Cryptography.ProtectedData.Protect(字节[]用户数据,字节[]可选熵,数据保护范围)
在c:\Users\Tiago\Documents\xpmarketplace\src\Extensions\Client\commercewclient\Providers\CookieTempDataProvider.Protect中的VirtoCommerce.Web.Client.Providers.CookieTempDataProvider.Protect(字节[]数据)中:第91行
在c:\Users\Tiago\Documents\xpmarketplace\src\Extensions\Client\commercewclient\Providers\CookieTempDataProvider.SaveTempData(ControllerContext ControllerContext,IDictionary`2值)中
位于System.Web.Mvc.TempDataDictionary.Save(ControllerContext ControllerContext,ITempDataProvider tempDataProvider)
在System.Web.Mvc.Controller.PossiblySaveTempData()中
位于System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
在System.Web.Mvc.Controller.b_uu15上(IAsyncResult asyncResult,Controller)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResultBase`1.End()
在System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)上
位于System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
位于System.Web.Mvc.MvcHandler.b_uu5(IAsyncResult asyncResult,ProcessRequestState innerState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResultBase`1.End()
位于System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
在System.Web.Mvc.MvcHandler.System.Web.IHTTPassynchandler.EndProcessRequest中(IAsyncResult结果)
在System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)上
在谷歌搜索异常文本后,我遇到了一些指南,提示我应该在IIS应用程序池中将Load User Profile设置为True,我尝试这样做只是为了发现默认情况下它已经为True

这是一个来源


编辑:系统生成任何令牌(帐户激活、重置密码)时引发异常

更新了CookieTempDataProvider类,该类使用MachineKey而不是ProtectedData来加密和解密cookie。这应该解决问题。我将重建我们的测试和演示环境,并检查它是否工作。但是您可以下载完整的源代码,也可以只下载该类并重新编译。它应该可以解决您的问题。

您使用的是哪个版本?我相信它在最新版本(1.13)中得到了解决。这是github repo master的最新版本,版本1.13。我能够复制这个问题,并将提供简短的修复感谢您的回复和修复。另外,您是否再次尝试将所有内容重新部署到Azure云?它工作正常吗?是的,我们更新了演示,它工作正常。系统到处都在使用MachineKey,除了一个类,一定是不知怎么错过了。我得到了一个404错误,但它似乎与这个问题无关。。。谢谢。你能再创建一张票证,详细描述一下例外情况吗?似乎找不到网站,这可能是由于后端未配置存储导致的。Web.config中的“DefaultStore”值错误。该值设置为存储名称,而不是存储id。现在已解决该问题。谢谢