即使我在 Windows 8 中安装了协议,SignalR 也不会使用 Websocket 协议 [英] SignalR won't use Websocket protocol even though I have the protocol installed in windows 8

查看:21
本文介绍了即使我在 Windows 8 中安装了协议,SignalR 也不会使用 Websocket 协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Signalr 在我的 Web 应用程序中执行一些实时事件.我正在尝试强制 signalr 使用新的 websocket 协议,但它不会,即使我指定了它.

I'm using signalr to do some real-time events in my web application. I'm trying to force signalr to use the new websocket protocol but it won't, even if I specify it.

$.connection.hub.start({ transport: 'webSockets' })

我确实安装了 Web 套接字协议,并且正在运行带有 IIS 8 的 Windows 8.

I definitely have the web socket protocol installed and I am running Windows 8 with IIS 8.

我还需要做什么才能在 Signalr 中启用 Web 套接字支持?

What else do I need to do to enable web sockets support in signalr?

推荐答案

确保您的应用正在使用 SignalR 包中的 .NET 4.5 程序集.如果项目以 4.0 为目标,或者以这种方式开始,那么 nuget 将添加对不支持 websocket 的 4.0 SignalR 程序集的引用.如果是这种情况,那么只需将信号器包卸载并重新安装到您的项目中.

Ensure that your app is using the .NET 4.5 assembly from the SignalR package. If the project is targeting 4.0, or it started that way, then nuget would have added a reference to the 4.0 SignalR assembly which doesn't support websockets. If that's the case, then just uninstall and re-install the signalr packages into your project.

这篇关于即使我在 Windows 8 中安装了协议,SignalR 也不会使用 Websocket 协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆