Reputation: 1299
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:
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
Reputation: 24833
Remove the api/ from the url, and just use localhost:(port)/signalr/chat
Upvotes: 1