Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NETCore Signalr not work on AWS

We have two applications, server-side (.Net Core 2.0) and client side (AngulerJs) that they are hosted on AWS elistic container service, also, there is a layer of cloud flare, in addition, we are using an ALB that is pointing to our docker containers.

Our solution should have a real time services which pushs data to the client side, so we used asp net core signalr version = "1.0.0-alpha2-final" for this purpose.

The problem is, the signalr is working fine when we test it in localhost but when host the applications in the AWS it works for 1 minute or so and then it throw error: "Websocket closed with status code: 1006 ()

like image 422
Abdelrahman Nafea Avatar asked Jan 23 '18 08:01

Abdelrahman Nafea


1 Answers

It's a CloudFlare which closes your connection after 60 seconds. You should ping to keep the connection open.

like image 176
Zygimantas Avatar answered Sep 16 '22 14:09

Zygimantas