更新到2.1后,SignalR无法工作?

时间:2014-07-21 12:11:40

标签: c# jquery asp.net asp.net-mvc signalr

我刚在项目中更新了jquery.signalR 更新后,信号灯不再工作。
我启用了日志记录,如下所示:

  $.connection.hub.logging = true;

以下是我的siganlR日志

[16:34:11 GMT+0330 (Iran Standard Time)] SignalR: Client subscribed to hub 'leecherhub'. jquery.signalR-2.1.0.js:81
[16:34:11 GMT+0330 (Iran Standard Time)] SignalR: Negotiating with '/signalr/negotiate?clientProtocol=1.4&connectionData=%5B%7B%22name%22%3A%22leecherhub%22%7D%5D'. jquery.signalR-2.1.0.js:81
[16:34:11 GMT+0330 (Iran Standard Time)] SignalR: Connecting to websocket endpoint 'ws://localhost:1758/signalr/connect?transport=webSockets&clientProtocol=1.4&connectionToken=oTO6pipUB4XMMRsQpYxz8gCote5oXgW60YUHHiZKfk2lmRrVAPAFyU6MUk1ahDvgFWnT08wmgNPvdIVBgHBP%2FsZtfKMJFJ2%2BjaqaFyahwVf9K3mZs3l9kG%2BF8wwCCO3B&connectionData=%5B%7B%22name%22%3A%22leecherhub%22%7D%5D&tid=9'. jquery.signalR-2.1.0.js:81
[16:34:12 GMT+0330 (Iran Standard Time)] SignalR: Websocket opened. jquery.signalR-2.1.0.js:81
[16:34:16 GMT+0330 (Iran Standard Time)] SignalR: webSockets timed out when trying to connect. jquery.signalR-2.1.0.js:81
[16:34:16 GMT+0330 (Iran Standard Time)] SignalR: Closing the Websocket. jquery.signalR-2.1.0.js:81
[16:34:17 GMT+0330 (Iran Standard Time)] SignalR: Attempting to connect to SSE endpoint 'http://localhost:1758/signalr/connect?transport=serverSentEvents&clientProt…2BF8wwCCO3B&connectionData=%5B%7B%22name%22%3A%22leecherhub%22%7D%5D&tid=2'. jquery.signalR-2.1.0.js:81
[16:34:17 GMT+0330 (Iran Standard Time)] SignalR: EventSource connected. jquery.signalR-2.1.0.js:81
[16:34:22 GMT+0330 (Iran Standard Time)] SignalR: serverSentEvents timed out when trying to connect. jquery.signalR-2.1.0.js:81
[16:34:22 GMT+0330 (Iran Standard Time)] SignalR: EventSource calling close(). jquery.signalR-2.1.0.js:81
[16:34:22 GMT+0330 (Iran Standard Time)] SignalR: This browser supports SSE, skipping Forever Frame. jquery.signalR-2.1.0.js:81
[16:34:22 GMT+0330 (Iran Standard Time)] SignalR: Opening long polling request to 'http://localhost:1758/signalr/connect?transport=longPolling&clientProtocol=…2BF8wwCCO3B&connectionData=%5B%7B%22name%22%3A%22leecherhub%22%7D%5D&tid=3'. jquery.signalR-2.1.0.js:81
[16:34:22 GMT+0330 (Iran Standard Time)] SignalR: Long poll complete. jquery.signalR-2.1.0.js:81
[16:34:22 GMT+0330 (Iran Standard Time)] SignalR: Opening long polling request to 'http://localhost:1758/signalr/poll?transport=longPolling&messageId=d-76EB7D…2BF8wwCCO3B&connectionData=%5B%7B%22name%22%3A%22leecherhub%22%7D%5D&tid=6'. jquery.signalR-2.1.0.js:81
[16:34:27 GMT+0330 (Iran Standard Time)] SignalR: longPolling timed out when trying to connect. jquery.signalR-2.1.0.js:81
[16:34:27 GMT+0330 (Iran Standard Time)] SignalR: Aborted xhr request. jquery.signalR-2.1.0.js:81
[16:34:27 GMT+0330 (Iran Standard Time)] SignalR: Stopping connection. jquery.signalR-2.1.0.js:81
[16:34:27 GMT+0330 (Iran Standard Time)] SignalR: Fired ajax abort async = true. 

问题是什么?

修改 我的信号器很少连接,但大部分时间都发生错误

2 个答案:

答案 0 :(得分:1)

您的问题很可能是此处报告的错误https://github.com/SignalR/SignalR/issues/3116

我有同样的问题,我认为2.1是一个糟糕的版本。我最终回滚到2.0.3

答案 1 :(得分:0)

这是一个错误。
https://github.com/SignalR/SignalR/issues/3148
通过更新到SignalR 2.1.1来解决问题