我已在Azure帐户上配置了SignalR资源,并使用C#编写的Azure函数中的以下代码段将消息发送到SignalR集线器:
await signalRMessages.AddAsync(new SignalRMessage()
{
Target = "notify",
Arguments = new object[] { requestBody }
});
但是,我不断收到以下错误消息。
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
我还验证了Azure函数的协商函数URL是否按预期向我返回了以下信息。
{“ endpoint”:“ https://xxxxxxx.service.signalr.net:5001/client/?hub=broadcast”,“ accessKey”:“ yyyyyyyy”}
为什么会出现连接错误,我该如何更改配置?