I am currently tearing my hair out at work trying to resolve an issue with a web application that uses SignalR over WebSockets where traffic is directed through a Barracuda Web Application Firewall (WAF). Every attempt to connect to the signalr/connect
endpoint using websockets would fail with a 400 Bad Request. The connection is then reverted back to WebServer polling which works, but isn't what we want.
Requests made are sent to our Barracuda Web Application Firewall and are then sent on to our Load Balanced IIS Web Servers. We are using IIS 8.5 on Windows Server 2012R2 and the application is a .Net 4.6.2 Web Application.
The same setup (Not using a Barracuda WAF), works without an issue.
So Far I have
Enabled Websockets in the WAF as per this article https://campus.barracuda.com/product/webapplicationfirewall/doc/49054741/how-to-enable-websocket. I still get the same 400 error.
Checked to make sure that my IIS Servers have the WebSocket
Feature enabled.
Turned on SignalR debugging/tracing in the Web.Config as per https://docs.microsoft.com/en-us/aspnet/signalr/overview/testing-and-debugging/enabling-signalr-tracing. This results in log files, but no indicates errors.
I am not sure what else to check?