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 looki
I had the same issue, and it is related to IoC (with whatever such as ninject or castle). If you set the global dependency resolver to your IoC manager, it will also replace the SignalR inner pipeline resolution. This makes your SingleTon client hub, not work correctly.
I solved it by only having the Server Hubs being IoC-ed The code below requires SignalHubActivator (you can find it on the internet)
Now, GlobalHost.ConnectionManager.GetHubContext will return the single instance AND client methods will be called correctly again!
//configuration.Resolver = signalrDependency ; dont, this will cause GlobalHost.ConnectionManager to be intercepted by Castle
configuration.Resolver.Register(typeof(IHubActivator),
() => new SignalHubActivator(container));