简体   繁体   中英

AspNetCore SignalR failed connection handshake

I already did some ASP.NET Core SignalR projects and I find this technology really great when it comes to bidirectional client/server communication for different kinds of clients.

So I used SignalR for the communication layer when porting an existing .NET Framework application to .NET Core to let it run on a raspberry.

In debug mode everything worked fine. But after releasing it to the testing environment I suddenly got the "failed connection handshake" error on the server.

What can be the reason for that?

I answer my own question since I found the root of the problem: None of the GitHub posts and SO articles solved the problem so it must have to do something with my environment.

Finally I found out, that the deployment script copied an old version of Newtonsoft.Json.dll to my output directory overwriting my current version 11 with version 6.

This old version led to the "failed connection handshake" error. Replacing it with version 11 fixed the issue.

I have faced the same issue, ASP.Net Core SignalR application was working fine in local machine, when deployed it in Azure VM I was getting "failed connection handshake" error.

In my case, it got resolved after enabling the port for Websocket(can choose Any) for inbound rules in Azure portal. Also test in latest browsers that may help.

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