Reputation: 30388
I'm trying to implement SignalR in my ASP.NET Core 2.0 app -- using SignalR Core Alpha.
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.
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
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