微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

asp.net – SignalR 2在Azure上失败

我在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()的调用.希望这有助于某人.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐