加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – SignalR 2在Azure上失败

发布时间:2020-12-16 03:52:58 所属栏目:asp.Net 来源:网络整理
导读:我在Azure上部署了一个ASP.NET 5 MVC 6应用程序,并使用SignalR 2遇到了这个问题: 从客户端开始连接时,请致电 /signalr/negotiate?clientProtocol=1.5connectionData=%5B%7B"name"%3A"gameHub"%7D%5D_=1460028930688 失败,错误500. 错误500背后的例外是: Ex
我在Azure上部署了一个ASP.NET 5 MVC 6应用程序,并使用SignalR 2遇到了这个问题:
从客户端开始连接时,请致电

/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B"name"%3A"gameHub"%7D%5D&_=1460028930688

失败,错误500.

错误500背后的例外是:

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.

来源错误:

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

我阅读并尝试了在SignalR CryptographicException on AzureWebsites建议的解决方案,但id对我不起作用.

据我了解,Azure不允许LoadUserProfile.

任何解决方法?

解决方法

我有同样的问题,我的修复是在调用MapSignalR()之前添加对UseAesDataProtectorProvider()的调用.希望这有助于某人.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读