SignalR cannot read property client of undefined

I fixed that problem by changing my js code from: var myHub = $.connection.SentimentsHub; to var myHub = $.connection.sentimentsHub;

So if you have some hub with class name TestHub you must use testHub(first letter is lowercase) name in js


For those who tried to add the generated proxy file path in the bundle.

Do not include the "~/signalr/hubs" in your BundleConfig.cs.

You can have the JQuery.SignalR in the bundle:

bundles.Add(new ScriptBundle("~/bundles/signalr").Include(
                  "~/Scripts/jquery.signalR-{version}.js"));

But you will need to add "/signalr/hubs" it in your view:

@section Scripts {
    @Scripts.Render("~/bundles/signalr")
    @Scripts.Render("/signalr/hubs")
}

I hope this helps.