Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception thrown and not caught in IE7 (jquery.signalR-0.5.1.js, line 22 character 9)

Tags:

signalr

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.";
    }

My mvc 4 webpage use signalR Hub works fine in Firefox, IE8 and Chrome but it has problems in IE7, did anyone get the same problems?

like image 444
Andrex Hn Avatar asked Jun 26 '12 10:06

Andrex Hn


1 Answers

From the SignalR FAQ https://github.com/SignalR/SignalR/wiki/Faq:

Why doesn't SignalR work in browser IE6/IE7?

SignalR requires a JSON parser and ability to send xhr requests (for long polling). If your browser has none, you'll need to include json2.js in your application (SignalR will throw an error telling your you need it as well). You can get it on NuGet.

like image 125
davidfowl Avatar answered Oct 02 '22 14:10

davidfowl