Asp.net mvc 多次调用方法后信号器断开连接

Asp.net mvc 多次调用方法后信号器断开连接,asp.net-mvc,signalr,Asp.net Mvc,Signalr,我正在使用ASP.NET MVC5构建一个web应用程序,并决定实现通知信号器 我决定也为其他实时客户机-服务器交互实现它 我有一个跟随按钮。单击时,它将调用follow方法并发送ID notificationsHub.server.followAction(requestId); 我现在把它放在同一个中心,不确定在单独的中心是否更好 然后,我在解除跟踪时绑定另一个服务器方法 notificationsHub.server.unfollowAction(requestId); 它在两个动作中

我正在使用ASP.NET MVC5构建一个web应用程序,并决定实现通知信号器

我决定也为其他实时客户机-服务器交互实现它

我有一个跟随按钮。单击时,它将调用follow方法并发送ID

notificationsHub.server.followAction(requestId);
我现在把它放在同一个中心,不确定在单独的中心是否更好

然后,我在解除跟踪时绑定另一个服务器方法

notificationsHub.server.unfollowAction(requestId);
它在两个动作中都能正常工作,直到达到大约5-6次咔嗒声,然后轮毂会无缘无故断开连接

这是JavaScript日志:

[11:30:41 GMT+0100 (W. Central Africa Standard Time)] SignalR: Invoking notificationshub.FollowAction
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: notificationshub.FollowAction failed to execute. Error: Error: Send failed.
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: Stopping connection.
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: EventSource calling close().
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: Fired ajax abort async = true.
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: Stopping the monitoring of the keep alive.
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: Clearing hub invocation callbacks with error: Connection was disconnected before invocation result was received..
jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: notificationshub.UnfollowAction failed to execute. Error: Connection was disconnected before invocation result was received.
4jquery.signalR-2.2.1.js:82 [11:31:35 GMT+0100 (W. Central Africa Standard Time)] SignalR: notificationshub.FollowAction failed to execute. Error: Connection was disconnected before invocation result was received.

谢谢大家!

我正在使用的机器似乎需要安装webSockets协议,而且这个问题在4天前的最新Signal发行版中已经修复。

如果不发布您的代码,我们怎么可能帮助您?我们不知道你想做什么。