SignalR Core给ConnectionId所需的错误

问题描述 投票:0回答:1

我正在尝试在我的ASP.NET Core 2.0应用程序中实现SignalR - 使用SignalR Core Alpha。

enter image description here

当我使用Postman向Hub发送一个简单的文本时,我得到HttpStatus 400ConnectionId Required错误消息。在Postman中,我尝试了GETPOST方法,并得到了相同的结果。

enter image description here

enter image description here

我有一个非常简单的方法来接收一个字符串 - 见下文:

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

知道这里有什么问题吗?

asp.net-core signalr asp.net-core-2.0 asp.net-core-signalr
1个回答
1
投票

在Twitter上得到了自己@DavidFowl的回复,我必须通过SignalR客户端发送我的消息,以便集线器接受它们。 SignalR hub不接受来自常规Web客户端的消息。 https://twitter.com/SamUresin/status/944652532990738433

© www.soinside.com 2019 - 2024. All rights reserved.