SignalR cannot read property client of undefined

前端 未结 10 2287
醉话见心
醉话见心 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:10

    Your hub classes must be defined as public. For example:

    class ChatHub : Hub
    

    should actually be

    public class ChatHub : Hub
    

提交回复
热议问题