简体   繁体   中英

Why am I getting connection error on calling notify on Azure SignalR

I have configured a SignalR resource on my Azure account and am sending a message to the SignalR Hub using the below snippet in an Azure Function written in C#:

await signalRMessages.AddAsync(new SignalRMessage()
            {
                Target = "notify",
                Arguments = new object[] { requestBody }
            });

However, I keep getting the below error.

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

I have also verified that the Azure function URL for negotiate function returns me the below information as expected.

{"endpoint":" https://xxxxxxx.service.signalr.net:5001/client/?hub=broadcast ","accessKey":"yyyyyyy"}

Why am I getting the connection error and what could I change in my configuration?

This error means no server listening at specified ip/port that you are trying to connect to. It can be caused by using the wrong IP address or the wrong PORT .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM