Following scenario: I've got a ASP.NET Web Api running a SignalR hub, serving a SPA. The SignalR hub is used to communicate with several C# SignalR clients. Now I want to retrieve data from a specific client and return this data from the Web API Controller to the web client. Please see my sample below:
public async Task<IHttpActionResult> Get()
{
Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext<Hubs.ConfigHub>().Clients.Client("SomeConnectionId").getData();
// SignalR client is calling a callback method on the SignalR hub hosted in the web api
// return data;
}
Is there any way how I can achieve this?