title: Unable to send notification from controller using signalr
body: <p>I am trying to send Some data/notification to my Angular client from .net core controller when an event is fired. I am using signalr to do this. but i am unable to recieve notification on my client. Can someone please guide me on what might be the problem.</p>
  
  <p>Angular Component</p>
  
  <pre class="lang-ts prettyprint-override"><code>ngOnInit() {
      this._hubConnection = new signalR.HubConnectionBuilder()
         .configureLogging(signalR.LogLevel.Information)
         .withUrl("http://localhost:5000/message", this.transportType)
         .build();
  }
  
  form() {
      this._hubConnection.on("Send", (data) =&gt; {
          console.log(data);
          that.disabled = false;
      });
  
      this._hubConnection.start()
          .then(() =&gt; console.log('connected'))
          .then(() =&gt; this._hubConnection.stop())
          .then(() =&gt; console.log('Disconnected'))
          .catch(e =&gt; console.error(e.message));
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public class DataController : Controller
  {
      private IHubContext&lt;DataHub&gt; _hubContext;
  
      public DataController(IHubContext&lt;DataHub&gt; hubContext)
      {
          _hubContext = hubContext;
      }
  
      private void OnProvideData(DataAndHeader data)
      {
          // server side code
          var data = "1234"
          _hubContext.Clients.All.SendAsync("Send", data);
      }
  }
  </code></pre>
  
  <p>SignalR Hub</p>
  
  <pre><code>public class DataHub : Hub { }
  </code></pre>
  
  <p>I want to write the data from server side on client console.</p>