-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SignalR Core on .NET Core 2.2 not connecting on Azure but works locally #8677
Comments
Ok, after spending a couple of days I finally solved it (just after posting the question of course). The problem was hidden in the exception in the catch clause. I use typescript and webpack to bundle the solution. Previous versions of @aspnet/signalr had some kind of babel issue so I had to use a babel-loader to transpile the js code. This seems to have changed between 1.1.0-preview2-35157 and 1.1.0. By removing the babel-loader from node_modules/signalr the code compiles correctly. When using the babel-loader I got an exception in the signalr source: |
Describe the bug
I've been using SignalR Core for quite some time and it have been working nicely. When upgrading versions it stopped working on Azure but it still works locally. I upgraded these packages:
1.1.0-preview2-35157
to1.1.0
(@aspnet/signalr)1.1.0-preview2-35157
to1.1.0
(Microsoft.AspNetCore.SignalR)I did change the CORS settings since "AllowCredentials" is no longer allowed in combination with "AllowAnyOrigin". The CORS settings are only used for localhost development, in Azure environment everything runs on the same origin so no CORS is necessary.
Everything works perfectly in localhost but in Azure (I host the solution as an app service) the client cannot connect to the server. No error, no log, only "pending" connection,
hubConnection.start()
does not finish.I've tried to apply CORS even for Azure but it does not help.
It is worth noting that the Azure environment uses HTTPS but localhost does not.
Expected behavior
That the connection establishes correctly.
Screenshots
Additional context
dotnet --info
:It is somewhat similar to #4483 (but CORS does not help). It is also somewehat similar to #4389 (but I do not use MessagePack).
Some relevant code snippets:
Startup.cs :: ConfigureServices
:services.AddSignalR();
Startup.cs :: Configure
:app.UseSignalR(routes =>{ routes.MapHub("/ws"); });
websockets.ts
:Any ideas?
The text was updated successfully, but these errors were encountered: