title: The On event on the SignalR Client Hub does not get called
body: <p>I seem to have an issue with SignalR's JS Client Hub.</p>
  
  <p>The problem is that the 'on' handler does not seem to work - it generates no error but doesn't receive any signals sent by the server.
  The code below shows an extract where I call the server (using the invoke) which works fine - then on the server I call back to acceptHubData which should be picked up on the client but isn't.</p>
  
  <p>My objective is when navigating to pages that each page will open a connection to a specific hub and releases this connection when the user moves to another page!!</p>
  
  <p><strong>EDIT</strong>:  using the following code snippet works but I wonder why the code further below using the 'on' event doesn't work!</p>
  
  <pre><code>    var superHub = $.connection.mySuperHub;
  
      superHub.client.acceptHubData = function (data) {
          $('&lt;li&gt;hello there' + data + '&lt;/li&gt;').prependTo($('#ul1'))
      }
  
      $.connection.hub.start().done(function () {
          $('&lt;li&gt;done phase 1&lt;/li&gt;').prependTo($('#ul1'))
      });
  </code></pre>
  
  <p>Any help would be much appreciated!</p>
  
  <p>This is the client code (in js)</p>
  
  <pre><code>$(document).ready(function () {
  
      var myHub;
  
      try {
  
          var connection = $.hubConnection();
  
          connection.start().done(function () {
  
              myHub = connection.createHubProxy("mySuperHub");
  
              myHub.on('acceptHubData', function (data) {
                  alert(data);   // THIS IS NOT CALLED!
              });
  
              myHub.invoke('AcceptSignal', "hello from the client2");
  
          });
  
      }
      catch (e) {
          alert(e.message);
      }
  });
  </code></pre>
  
  <p>This is the Server code:</p>
  
  <pre><code>[HubName("mySuperHub")]
  public class MyHub : Hub
  {
  
      private readonly HubEngine _hubEngine;
  
      public MyHub() : this(HubEngine.Instance) { }
  
      public MyHub(HubEngine hubEngine)
      {
          _hubEngine = hubEngine;
      }
  
      public void AcceptSignal(string msg)
      {
          Clients.Caller.acceptHubData("hi");
          Clients.All.acceptHubData("hi");
      }
  
  }
  </code></pre>