Search code examples
.netubuntuwebsocketsignalr

Signalr working locally but not working on Server


I Can use signalR on locally, but I can't use it on real server , I receive proxy error .
Tools are :(nginx version 1.20 - ubuntu - .Netcore)

Error Message on console :

*WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.


Solution

  • The problem is our nginx version is 1.2 but websocket(signalR) feature comes with version 1.3+ .Now alternative awesome solution to this is , using LongPolling instead of WebSockets. Hope this can help whoever facing with this issue.