title: How do I call a SignalR hub method from the outside?
body: <p>This is my <code>Hub</code> code:</p>
  
  <pre class="lang-c# prettyprint-override"><code>public class Pusher : Hub, IPusher
  {
      readonly IHubContext _hubContext = GlobalHost.ConnectionManager.GetHubContext&lt;Pusher&gt;();
  
      public virtual Task PushToOtherInGroup(dynamic group, dynamic data)
      {
          return _hubContext.Clients.Group(group).GetData(data);
      }
  }
  </code></pre>
  
  <p>I want call this method in another project with this code:</p>
  
  <pre class="lang-c# prettyprint-override"><code>var pusher = new Pusher.Pusher();
  pusher.PushToOtherInGroup("Test", new {exchangeTypeId, price});
  </code></pre>
  
  <p>I want call <code>PushToOtherInGroup</code>,when calling the method i don't get any error.but pusher does not work.</p>
  
  <p>This is my Ui Code:</p>
  
  <pre class="lang-js prettyprint-override"><code>$(function() {
      hub = $.connection.pusher;
      $.connection.hub.start()
          .done(function() {
              hub.server.subscribe('newPrice');
              console.log('Now connected, connection ID=' + $.connection.hub.id);
          })
          .fail(function() { console.log('Could not Connect!'); });
  });
  
  (function() {
      hub.client.GetData = function (data) {
          debugger;
      };
  });
  </code></pre>
  
  <p>What is my problem?</p>