Internet Explorer just keeps biting us web developers in the ass and we have no choice but to find work arounds.

After toying around with SignalR on my MVC3 application, I tested things out in IE 8. Surprise surpise. It didn't work.

When you run your application in Internet Explorer you'll see this dreaded icon on the bottom left.

Click it, and you'll be taken to the error window, showing you what went wrong. Go ahead and tick the little checkbox so that window fires up immediately after any javascript errors. We're trying to find the exact culprit.

Hit refresh and this window will pop up. You can now see what's causing things to go south. It's the signalR.min.js file, line 1, position 161.

Let's open up that file and see what's on that line:

if (!t.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."

The SignalR team bless their heart, great documentation. Simple enough, we need the json2.js library.

Using NuGet search for the json2.js file and install it.

Now let's head over to the area where I'm referencing the signalr.js file, and call json2.js before it, like so:

0 user(s) viewing

0 Guests0 member(s)0 anonymous member(s)

About Me

Bienvenidos! I'm a USA ex-pat living in Bolivia for the past 10 years. Web development is my forte with a heavy lean for usability and optimization. I'm fluent in both English and Spanish. I guest write for the popular Python website Python Central. Visit my website.