SignalR won#39;t use Websocket protocol even though I have the protocol installed in windows 8(即使我在 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 协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:即使我在 Windows 8 中安装了协议,SignalR 也不会使用 Websocket 协议
基础教程推荐
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
