Reputation: 1691
I have a signalR hub that works fine in the traditional sense. I can connect to it through javascript/jquery and things work fine.
I need to connect node.js as a client to signalR and I'm having some trouble. Is there an easy way to do this?
I've been trying to implement this node library: signalr-client and keep running into an issue on the node side. "Sec-WebSocket-Accept header from server didn't match expected value of {hashed value}".
When I debug the .NET hub side, I can tap into:
override Task OnConnected()
During debugging I can see the value of the request header "Sec-WebSocket-Key" coming through properly:
However the response on the node side always errors out with this:
Upvotes: 1
Views: 783
Reputation: 99
open: node-modules/websocket/lib/websocketclient.js
if (headers['sec-websocket-accept'] !== expectedKey) {
//this.failHandshake('Sec-WebSocket-Accept header from server didn\'t match expected value of ' + expectedKey);
//return;
}
remark 2 lines as above.. thats all
Upvotes: 1