title: SignalR in Angular 7 and ASP.Net MVC
body: <p>I want to use SignalR 2 in my angular app as client and ASP.Net MVC as backend.<br/>
  I installed <code>Microsoft.AspNet.SignalR</code> and <code>Microsoft.Owin</code> and add <code>startup.cs</code> and <code>ChatHub.cs</code> like this:<br/><br/>
  <strong>startup.cs</strong></p>
  
  <pre><code>[assembly: OwinStartup(typeof(MyMvcApp.Startup))]
  namespace MyMvcApp
  {
      public class Startup
      {
          public void Configuration(IAppBuilder app)
          {
              app.MapSignalR();
          }
      }
  }
  </code></pre>
  
  <p><br/>
  <strong>ChatHub.cs</strong></p>
  
  <pre><code>namespace MyMvcApp.Hubs
  {
      public class ChatHub : Hub
      {
          public void Send(string user, string message)
          {
              Clients.All.SendMessage(message);
          }
      }
  }
  </code></pre>
  
  <p><br/>
  in my angular app I installed <code>signalr</code> npm and included signalr in <strong>angular.json</strong>:</p>
  
  <pre><code>"scripts": [
     "node_modules/signalr/jquery.signalR.js"
  ]
  </code></pre>
  
  <p><br/>
  and used in <strong>SignalRService</strong>:</p>
  
  <pre><code>start() {
      $.connection('http://localhost/hubs').start();
  }
  </code></pre>
  
  <p>but I get this error in browser console: <code>http://localhost/hubs/negotiate?clientProtocol=2.1&amp;_=1557811289416</code><br/>
  How can I fix this?</p>