SignalR websocket fails with unexpected response code 502 (IIS 8.5 / ARR 3.0)

2.8k views Asked by At

When trying to establish a web socked connection using SignalR I get an unexpected response error 502.

IE 10 reports: 'WebSocket Error: Incorrect HTTP response. Status code 502, Bad Gateway'

Chrome reports: 'WebSocket connection to 'wss://domain/root/signalr/connect?transport=webSockets&client....' failed: Error during WebSocket handshake: Unexpected response code: 502'

When I connect directly to the server, everything works as it should.

I have spend about 3-4 days now searching for how to get SignalR 2.2.1 working with an IIS 8.5, in Windows Server 2012 R2, ARR 3.0. I am using SSL/https, I have sticky sessions configured, same machine key on all my back end servers.

I have setup a test system, that has only a single server behind it, I have tried every suggestion that I can find but I still cant find a solution - or for that matter anyone indicating that they have successfully configured this even though Microsoft claim it is support "with no extra config".

Can anyone point me towards a guide or reference for getting this working ?

Can anyone confirm it even works - or that it does not work ?

1

There are 1 answers

0
karlm On

After many many hours, I finally came across this old article about the "Response Buffer Threshold" in the Proxy settings for a server farm.

Setting this one value to 0 finally resolved the issues I had been having...

You can read find the article here http://matthewmanela.com/blog/using-signalr-in-an-arr-cluster.