gpt4 book ai didi

signalr - 在 IE7 中抛出并没有捕获异常(jquery.signalR-0.5.1.js,第 22 行字符 9)

转载 作者:行者123 更新时间:2023-12-04 12:23:35 25 4
gpt4 key购买 nike

if (!window.JSON) {
// no JSON!
throw "SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.";
}

我的 mvc 4 网页使用 signalR Hub 在 Firefox、IE8 和 Chrome 中运行良好,但在 IE7 中存在问题,有人遇到过同样的问题吗?

最佳答案

来自 SignalR 常见问题解答 https://github.com/SignalR/SignalR/wiki/Faq :

为什么 SignalR 在浏览器 IE6/IE7 中不起作用?

SignalR 需要 JSON 解析器和发送 xhr 请求(用于长轮询)的能力。如果你的浏览器没有,你需要在你的应用程序中包含 json2.js(SignalR 会抛出一个错误告诉你你也需要它)。你可以在 NuGet 上得到它。

关于signalr - 在 IE7 中抛出并没有捕获异常(jquery.signalR-0.5.1.js,第 22 行字符 9),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11205277/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com