ASP.NETCore Signalr not work on AWS

痞子三分冷 提交于 2020-01-02 04:06:06

问题


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 ()


回答1:


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



来源:https://stackoverflow.com/questions/48397181/asp-netcore-signalr-not-work-on-aws

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!