title: Failing to connect to a SignalR hub from Javascript
body: <p>I'm trying to connect to a SignalR hub that is located in a seperate Web Api project from a MVC project but the connection keeps failing with error. I'm testing locally but apparently if you use IE it will handle Cross domain for you.  </p>
  
  <p>In Chrome </p>
  
  <blockquote>
    <p><a href="http://localhost:53453/signalr/negotiate?clientProtocol=1.5&amp;connectionData=%5B%7B%22name%22%3A%22gweventhub%22%7D%5D&amp;_=1430342757730" rel="nofollow">http://localhost:53453/signalr/negotiate?clientProtocol=1.5&amp;connectionData=%5B%7B%22name%22%3A%22gweventhub%22%7D%5D&amp;_=1430342757730</a>
    Failed to load resource: the server responded with a status of 404
    (Not Found) </p>
  </blockquote>
  
  <p>In IE</p>
  
  <blockquote>
    <p>Connection Error: Error during negotiation request.</p>
  </blockquote>
  
  <p>Here is the server code for the hub.</p>
  
  <pre><code>[HubName("GWEventHub")]
  public class GatewayEventHub : Hub
  {
      public override Task OnConnected()
      {
          this.Groups.Add(this.Context.ConnectionId, this.Context.Request.User.Identity.Name);
          return (base.OnConnected());
      }
  
      public override Task OnDisconnected(bool stopCalled)
      {
          this.Groups.Remove(this.Context.ConnectionId, this.Context.Request.User.Identity.Name);
          return base.OnDisconnected(stopCalled);
      }
  }
  </code></pre>
  
  <p>Here is the Javascript attempting to connect to the hub. This is located in a separate MVC app.</p>
  
  <pre><code>$(function () {
      var connection = $.hubConnection('http://localhost:53453');
      connection.logging = true;
  
      var hub = connection.createHubProxy('GWEventHub');
      hub.logging = true;
  
      function handleMessage(message) {
          console.log('message from hub: ' + message);
      }
  
      hub.on('sendUserMessage', handleMessage);
  
      connection.start()
          .done(function() {
              alert('connect to GatewayEventHub, Connection ID = ' + connection.id);
          })
          .fail(function(e) {
              console.log('Connection Error ' + e);
          });
  });
  </code></pre>
  
  <p>Is there something I'm missing in the connection process?    </p>