SignalR cannot read property client of undefined

前端 未结 10 2286
醉话见心
醉话见心 2020-12-13 08:42

I\'m trying to add SignalR to my project (ASPNET MVC 4). But I can\'t make it work.

In the below image you can see the error I\'m receiving.

10条回答
  •  情深已故
    2020-12-13 09:06

    For ASP.Net MVC folks:

    Check your _Layout.cshtml: If you are calling the jquery bundle after the @RenderBody(), you will get this error.

    Resoultion: Just move the @Scripts.Render("~/bundles/jquery") to the head section or write all signalr scripts in the scripts "section"

提交回复
热议问题