How dotNet signalr works with AWS websockets Api

akhil_paul

New member
Joined
Sep 1, 2022
Messages
1
Programming Experience
1-3
We are working on the ASP.Net core API application. In this application, we have a SignalR module for notification. We plan to host the application in the AWS environment. We have used AWS lambda service to host the API, we plan to use a Web Socket API to consume the notification/SignalR part.

We are facing an issue with connecting the notification URL. When we tried to connect the Web socket URL from Commandline using Node, it is showing "Unexpected server response 403".

When we tried to consume the URL from the frontend application, it showed the below error. "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. ."

Tried to connection to websocket api url via Online WebSocket & Socket.io Tester - PieSocket Realtime but is getting -
failed: Error during WebSocket handshake: Unexpected response code: 502

We are stuck with this issue. Any help to resolve this issue would be appreciable.
 
First problem is the choice of using AWS Lambda Service. You'll want a full blown AWS instance, not a serverless configuration because the whole point of using SignalR is to have a real-time persistent connection to the server. If you don't have a real server, then why use SignalR?
 
Do you appreciate that SignalR is more than just WebSockets?

If Websockets were TCP, SignalR is more like HTTP. Use SignalR at both ends, and have an easy life, or use WebSockets at both ends and set yourself up for more work


Oh.. just saw the September datestamp..
 
Yes, I appreciate that SignalR is more than just web sockets, but I suspect that this serverless nature of AWS Lambda maybe a major part of the OP's issue all those months ago.
 
Back
Top Bottom