Connection ID required

15,250

The problem was that I have configured the hub at route /chat while my ChatController was also responsible for it. After mapping the hub to different route than the controller's one everything went fine.

I changed this: app.UseSignalR(routes => { routes.MapHub<ChatHub>("chat"); });

To this: app.UseSignalR(routes => { routes.MapHub<ChatHub>("chatter"); });

Share:
15,250
Georgi Stoimenov
Author by

Georgi Stoimenov

Curious developer.

Updated on June 20, 2022

Comments

  • Georgi Stoimenov
    Georgi Stoimenov almost 2 years

    I am trying to build a simple chat application using SignalR with ASP.NET Core 2.0. The problem is that when I want to access one of my hub's url (localhost:5000/chat) I receive as a response: Connection ID required with error code 400. I am using auto generated from template authentication (users are stored in local db).

    Here are the following components:

    Startup.cs

    ChatHub.cs

    Any help will be really appreciated. If you need any further information - please let me know.