Sam
Sam

Reputation: 30388

SignalR Core Giving ConnectionId Required Error

I'm trying to implement SignalR in my ASP.NET Core 2.0 app -- using SignalR Core Alpha.

enter image description here

When I use Postman to send a simple text to the Hub, I'm getting HttpStatus 400 with ConnectionId Required error message. In Postman, I tried both GET and POST methods and got the same result.

enter image description here

enter image description here

I have a very simple method that receives a string -- see below:

public Task Send(string message)
{
   return Clients.All.InvokeAsync("Send", message);
}

Any idea what's wrong here?

Upvotes: 1

Views: 5838

Answers (1)

Sam
Sam

Reputation: 30388

Got a response from the man himself @DavidFowl on Twitter that I must send my messages through the SignalR client for the hub to accept them. SignalR hub won't accept messages from a regular web client. https://twitter.com/SamUresin/status/944652532990738433

Upvotes: 5

Related Questions