How do I call a SignalR hub method from the outside?

后端 未结 3 854
有刺的猬
有刺的猬 2020-12-30 03:53

This is my Hub code:

public class Pusher : Hub, IPusher
{
    readonly IHubContext _hubContext = GlobalHo         


        
3条回答
  •  猫巷女王i
    2020-12-30 04:18

    If you're looking to call a method in your hub from another project then it needs to reside within the same app domain. If it does here's how you can do it:

    Call a hub method from a controller's action (don't mind the title, it works for your scenario)

提交回复
热议问题