I have set up a plain SignalR solution using .NET Core 2.2. I cannot use Core 3.x because I need to use some libraries that depends on 2.2.
It works fine when i debug locally.
However, when I deploy to Azure as an App Service, whenever the JS tries to establish a connection, I can see in Chrome's network tab that it fails when calling /hub/negotiate, and that it returns a 400.
This does not happen locally. Locally I'm running IIS Express, and the server in Azure is running Kestrel.
What I have tried thus far:
- Made sure web sockets is enabled under configuration in Azure. It was already enabled.
- I believe Kestrel is behind a proxy in Azure, so I added
app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto });at the very top. This had no effect.
I'm not using MessagePack.
Using:
- netcoreapp2.2
- @aspnet/signalr 1.1.4 (is this correct for 2.2? it works locally)
What could be wrong?


