I\'ve been experimenting with SignalR today and It\'s really neat. Basically what I wanted to achieve is the following:
As soon as a device connects it should send a mes
Thanks for all the help (upvoted you guys). Actually found the problem.. it was inside my client. I first subscribed to the 'hello' function and after that I started the HubConnection. As soon as I changed this order everything worked fine.
It worked with the following client code:
private async Task ConnectToSignalR()
{
var hubConnection = new HubConnection("url");
hubConnection.Headers["x-zumo-application"] = "clientapikey";
IHubProxy proxy = hubConnection.CreateHubProxy("ChatHub");
proxy.On("hello", async (msg) =>
{
Console.WriteLine(msg);
});
await hubConnection.Start();
}