title: Call SignalR Core Hub method from Controller
body: <p><strong>How can I call SignalR Core Hub method from Controller?</strong><br>
  I am using  ASP.NET Core 2.0 with Microsoft.AspNetCore.SignalR (1.0.0-alpha2-final).</p>
  
  <p>I have windows service which communicate with Excel, SolidEdge ... When operation is complete it post request to my controller in ASP.NET Core application. Now I need to inform all clients connected to server with SignalR that external program completed some task.<br>
  I can not change the way window service works. (Can not connect to SignalR from window service).<br>
  I found plenty solution for old SignalR (<code>GlobalHost.ConnectionManager.GetHubContext</code>), but much has changed and those solutions are not working anymore.</p>
  
  <p>My controller:</p>
  
  <pre><code>[Route("API/vardesigncomm")]
  public class VarDesignCommController : Controller
  {
      [HttpPut("ProcessVarDesignCommResponse/{id}")]
      public async Task&lt;IActionResult&gt; ProcessVarDesignCommResponse(int id)
      {
          //call method TaskCompleted in Hub !!!! How?
  
          return new JsonResult(true);
      }
  }
  </code></pre>
  
  <p>My hub:</p>
  
  <pre><code>public class VarDesignHub : Hub
  {
      public async Task TaskCompleted(int id)
      {
          await Clients.All.InvokeAsync("Completed", id);
      }
  }
  </code></pre>