JensOlsen112
JensOlsen112

Reputation: 1299

SignalR: "Protocol error: Unknown transport." when navigating to hub

I'm trying to use ASP.NET Signalr for the first time - here's what I've done: Created a new web project and added the following SignalR packages:

enter image description here

I've then created the following class:

[HubName("chat")]
public class ChatHub : Hub
{
    public void Hello()
    {
        Clients.All.hello();
    }
}

And the following startup configuration:

public partial class Startup
{
    public void Configuration(IAppBuilder app)
    {
        ConfigureAuth(app);
        app.MapSignalR();
    }
}

However whenever I navigate to

localhost:(port)/api/signalr/chat

I get the following error:

Protocol error: Unknown transport.

I'm running the latest browsers and have tried multiple different ones so what could be the issue?

Upvotes: 2

Views: 13719

Answers (1)

Ehsan Zargar Ershadi
Ehsan Zargar Ershadi

Reputation: 24833

Remove the api/ from the url, and just use localhost:(port)/signalr/chat

Upvotes: 1

Related Questions