SignalR - IE中的Forever Frame在空闲几分钟后停止工作 [英] SignalR - Forever Frame in IE stops working after a few minutes of being idle

查看:354
本文介绍了SignalR - IE中的Forever Frame在空闲几分钟后停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE9中使用SignalR,不幸的是,它必须降级为使用永久帧连接。

I am using SignalR in IE9 and, unfortunately, it has to degrade to using the forever frame connection.

我花了一些时间与开发人员一起看这个IE中的工具。我可以看到回调加载到动态插入的IFrame中,并且它们在SignalR插件中调用receive函数。然而,在大约20/30之后,它只是停止响应 - 我不能再从服务器调用客户端脚本。

I have spent some time looking at this with the Developer Tools in IE. I can see the callbacks loading into the dynamically inserted IFrame, and they call the receive function in the SignalR plugin. However after about 20/30 of these it just stops responding - I can no longer call client script from the server.

我猜测IFrame负载最终是时间out,但似乎没有为此提出任何事件,所以我无法强制重新连接。

I'm guessing that the IFrame load is finally timing out, but there appear to be no events raised for this, so I cannot force a reconnect.

有没有人设法在IE中获得强大的SignalR连接?

Has anyone managed to get a robust SignalR connection working in IE?

谢谢:)

推荐答案

我们遇到的问题是Javascript在网站将停止工作,特别是我们注意到这一点,因为Ajax调用不起作用。经过一番调查,我们发现SignalR是崩溃的原因,我们发现了这篇关于Forever Frames的帖子。我们尝试使用客户端JavaScript中的以下代码删除SignalR中的Forever Frames支持:

We had an issue where the Javascript on a website would stop working, specifically we noted this in that Ajax calls would not work. After some investigation we found that SignalR was the reason for the crash, and we found this post about Forever Frames. We tried removing Forever Frames support in SignalR with the following code in the clients JavaScript:

$.connection.hub.start({ transport: ['webSockets', 'serverSentEvents', 'longPolling'] });

因此只支持'webSockets','serverSentEvents','longPolling'。

Thus only supporting 'webSockets', 'serverSentEvents', 'longPolling'.

这篇关于SignalR - IE中的Forever Frame在空闲几分钟后停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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