我试图在我的ASP.NET Core 2.0应用程序中实现SignalR - 使用SignalR Core Alpha。
当我使用Postman向Hub发送简单文本时,我收到HttpStatus
400
并显示ConnectionId Required
错误消息。在Postman中,我尝试了两种GET
和POST
方法并得到了相同的结果。
我有一个接收字符串的非常简单的方法 - 见下文:
public Task Send(string message)
{
return Clients.All.InvokeAsync("Send", message);
}
知道这里有什么问题吗?
答案 0 :(得分:1)
在Twitter上得到了自己@DavidFowl的回复,我必须通过SignalR客户端发送我的消息,以便集线器接受它们。 SignalR hub不接受来自常规Web客户端的消息。 https://twitter.com/SamUresin/status/944652532990738433