title: ASP.NET core SignalR - hub Negotiate - Err_Connection_Refused
body: <p>I am working with SignalR for the first time and trying to connect to hub from Angular. I am trying to implement the same in this <a href="https://stackoverflow.com/questions/50608491/using-signalr-core-to-send-messages-from-a-controller-method-to-angular">LINK</a></p>
  
  <p>I am not sure where this negotiate comes from </p>
  
  <p>OPTIONS <a href="http://localhost:5001/messageHub/negotiate" rel="nofollow noreferrer">http://localhost:5001/messageHub/negotiate</a> net::ERR_CONNECTION_REFUSED</p>
  
  <p>Here is my code.</p>
  
  <pre><code>public startConnection = () =&gt; {
  this.hubConnection = new signalR.HubConnectionBuilder()
    .withUrl('http://localhost:5001/messageHub')
    .build();
  
  this.hubConnection
    .start()
    .then(() =&gt; alert('Connection started'))
    .catch(err =&gt; alert('Error while starting SignalR connection: ' + err));
  }
  </code></pre>
  
  <p>Here is appsettings.Development.json</p>
  
  <pre><code> "Logging": {
  "LogLevel": {
    "Default": "Debug",
    "System": "Information",
    "Microsoft": "Information"
  }},
  "SignalR": {
  "messageHub": "http://localhost:5001/messageHub"
    },
  "Api": {
  "GenerateTokenUrl": "http://localhost:5000/api/Values"
   }
  </code></pre>
  
  <p>It is giving me this error in Chrome Dev tools<a href="https://i.stack.imgur.com/UHlhx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UHlhx.png" alt="messageHub Negotiate"></a></p>