ASP.NET SignalR is pretty new and very exciting feature in ASP.NET. You might want to play around with it and may encounter some hiccups during your implementation. This post will cover some issues that you may encounter and how to avoid it.

If you have declared the following scripts in your View(.cshtml/.aspx)

Heck, Why is that? Here's the thing.. If you look at the _Layout.cshtml file you will notice that the default template in MVC 4.5 added the bundling below for jQuery scripts at the bottom before the closing tag of the <body> element.

So in this case when the page loads up it will give you this script reference order:

jQuery script

SignalR script

/signalr/hubs

your custom defined script

jQuery script

If you noticed the reference to jQuery gets duplicated which causes the exception above.

To avoid that exception you must remove the reference to your jQuery in your View(.cshtml/.aspx) because it's already bundled it for you for page performance/optimization. And instead you can put all your remaining scripts within the scripts section defined in @RenderSection. So the code will be like this: