SignalR /negotiate is making requests to /Account/Login - I have no Account/Login endpoint

Viewed 967

I'm seeing lots of entries in my logs from this request:

/signalr/negotiate

The error is:

The controller for path '/Account/Login' was not found or does not implement IController

I have a JS client connecting to an AppHub that requires authentication:

[Authorize]
[HubName("appHub")]
public class AppHub : Hub
{
    // content
}

This is happening because there's an 'signalr` session alive with an expired cookie attempting to connect:

  • I'm not sure why the request is automatically seeking out this page. It's not specified anywhere in my web.config, routes, or elsewhere. Why is this happening?
  • I'd like to prevent the signalR client from attempting to connect if the user is unauthenticated. How can this be achieved?
3 Answers
Related