SignalR calling client method from outside hub using GlobalHost.ConnectionManager.GetHubContext doesn't work. But calling from within the hub does
I'm trying to call a client method from within a .net Web API controller action. Can I do this? The only post I can find that comes close to what I am looking to do is this one: SignalR + posting a message to a Hub via an action method In there a message is sent from within an asp.net MVC controller action using GlobalHost.ConnectionManager.GetHubContext. When I try that inside my Web API action no errors are thrown, but the method "methodInJavascript" is never invoked on the client side. Public ActionResult MyControllerMethod() { var context = GlobalHost.ConnectionManager.GetHubContext<MyHub>