Last post Mar 01, 2014 10:53 AM by Taonias
Feb 19, 2014 03:16 AM|Taonias|LINK
I am using SignalR from visual studio 2010.
I have 2 operations in my hub. I made one static so it will be visible from a class i have.
public class MyHub : Hub
public void SendToAll(string rfp)
internal static void SendToUser(string connectionId, string message)
IHubContext context = GlobalHost.ConnectionManager.GetHubContext<MyHub>();
Can I access SendToUser operation from a class file?
Feb 27, 2014 10:13 PM|Ruchira|LINK
The methods in the Hub class are supposed to call from clients, not from the server itself. Why would you need to do that?
Please 'Mark as Answer' if this post helps you
Mar 01, 2014 10:53 AM|Taonias|LINK
I needed that so that I can send regular real time messages to the client on scheduled dates without a call from the server.
Anyways this is my solution and it works fine.
public static void SendToAll(string rfp)
IHubContext context = GlobalHost.ConnectionManager.GetHubContext<SignalRHub>();