SignalR/SignalR — Issue #82: .NET (& Silverlight) client not being called back
Author: rmaclean
Created: 2011-12-01 07:05:22+00:00
State: open

*Introduction*
The .NET client does not seem to be able to get responses back from SignalR, this issue also affects the Silverlight client as it has the same code base.
This has been reproduced using the code currently available via Nuget &

*Expected behaviour*
Using the .NET client, subscribed messages should be raised.

*Actual behaviour*
The .NET client can connect, and send messages correctly but subscribed events are never raised.

*Code*
SignalR server (this is in an ASP.NET MVC application):
```
[HubName("cave")]
public class Chat : Hub
{
public void Echo(string input)
{
this.Clients["all"].reverb(input);
}

public void Join()
{
this.AddToGroup("all");
}
}
```

*JavaScript - this works fine in a view*
```
$(document).ready(function () {
var myHub = $.connection.cave;

myHub.reverb = function (s) {
var node = $("#me");
node.html(node.html() + s);

};

$.connection.hub.start(function () {
myHub.join();
});

});
```

*.NET Client - send works, recieve doesn't*
```
var connection = new HubConnection("http://localhost:2447/");
var proxy = connection.CreateProxy("cave");
proxy.On("reverb", data =>
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(data);
});

connection.Start().ContinueWith(t =>
{
proxy.Invoke("join");
});

char input = ' ';
while (input != '!')
{
Console.ForegroundColor = ConsoleColor.Blue;
input = Console.ReadKey().KeyChar;
proxy.Invoke("echo", input);
}

connection.Stop();
```