Reputation: 944
I have this class in my asp mvc project
[HubName("myHub")]
public class MyHub:Hub
{
[HubMethodName("Notify")]
public static void Notify(string msg)
{
var hubContext = GlobalHost.ConnectionManager.GetHubContext<myHub>();
hubContext.Clients.All.sendMessage(msg);
}
}
In signalR/hubs the Notify method is not registered
proxies.myHub = this.createHubProxy('myHub');
proxies.myHub.client = {};
proxies.myHub.server = {};
Upvotes: 1
Views: 290
Reputation: 944
I've removed the static attribute from the Notify function. She is now displayed in signalR/hubs
Upvotes: 1