A little about my hobbies: Development, Computer Networks and Security
Saturday, February 23, 2013
SignalR: Using a Hub instance not created by the HubPipeline is unsupported
When you need to push data to a SignalR hub from outside the hub (from a Controller for example), don't try to create a new instance of the Hub, like I did. Otherwise you'll see this nice exception:
"Using a Hub instance not created by the HubPipeline is unsupported"
From Microsoft.AspNet.SignalR.Core
Instead, the hub context must be retrieved:
var context = GlobalHost.ConnectionManager.GetHubContext<HubType>();
context.Clients.All.Whatever();
asdsadssaddsadsadsa
ReplyDeleteqweqweqweqeq
DeleteHello, The problem is that you can't target the Caller using this solution. Any help ?
ReplyDeletehttp://www.asp.net/signalr/overview/signalr-1x/getting-started/introduction-to-signalr
ReplyDeleteHello...
ReplyDeleteI want to user Clients.Caller with HubContext but it's showing me error that I can not use Clients.Caller with Hub Context
var context = GlobalHost.ConnectionManager.GetHubContext();
context.Clients.Caller.receiver(respose); //I need to use like this but fail
Try describing the issue on stackoverflow.com
Delete