-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Blazor Server .net 9 Websocket connection fails, Same site with .net 8 works fine #58932
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
Comments
Are you hosting with IIS OutOfProcess? Also, try |
oh yes thank you I forgot to mention that, both sites are outofprocess, that appears to be required for all .net core sites on smarterasp. I'll try your suggestion and report back thanks! |
oh my that seems to have done it!!! I no longer get the error on any browser or mobile after disabling compression. THANK YOU!! I do wonder if this is an environment thing, as I'm sure I'd appreciate being able to use compression, but let me report this to the host, and see if I can find more docs on what's required and I'll report back any findings. thanks again!!! |
OutOfProcess will not support compression, but we are fixing it to not fail the websocket connection. |
ah okay awesome thank you for sharing this additional insight, and the coming update to resolve it, you really made my day! |
@BrennanConroy thanks for catching this. |
When hosting behind iis via arr and forwarding to a server in a serverfarm, after upgrading to .net 9 the app doesn't work either caused by the new default compression. After disabling the compression, the app works again in .net 9. |
9.0.1 has been released and has a fix for this. To get the fixed bits you need to install the new hosting bundle, instructions and various options are described in https://learn.microsoft.com/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-9.0 The workaround: |
Its still causing an issue for me in blazor .net 9.0 hosting is shared hosting beyond my control @BrennanConroy the work around in lattest .net 9 doesnt seem to expose DisableWebSocketCompression |
I did install the new hosting bundle and I even set this
and still happen the same to me and this is new app created from Visual Studio templates doesn't have anything else than what comes with the template |
Thank you @BrennanConroy, in my case, what fixed it was: app.MapRazorComponents<ChattelWeb.Components.App>() |
It actually ended up being my ssl expired reloaded new ssl seems to fix issue Sent from my iPhoneOn 20 Mar 2025, at 22:37, Richard Dufour ***@***.***> wrote:
Are you hosting with IIS OutOfProcess?
Also, try MapRazorComponents<App>().AddServerSideComponents(o => o.DisableWebSocketCompression = true)
Thank you @BrennanConroy, in my case, what fixed it was:
app.MapRazorComponents<ChattelWeb.Components.App>()
.AddInteractiveServerRenderMode(o => o.DisableWebSocketCompression = true);—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
Richard-Dufour left a comment (dotnet/aspnetcore#58932)
Are you hosting with IIS OutOfProcess?
Also, try MapRazorComponents<App>().AddServerSideComponents(o => o.DisableWebSocketCompression = true)
Thank you @BrennanConroy, in my case, what fixed it was:
app.MapRazorComponents<ChattelWeb.Components.App>()
.AddInteractiveServerRenderMode(o => o.DisableWebSocketCompression = true);
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
I'm encountering a strange issue and I'm not really sure how to approach it. I host my websites with smarterasp.net which added support for .net 9 with yesterday's release...
However, after upgrading and publishing my blazor server app from .net 8.0 to 9.0, it is failing to establish the websocket connection and not running as expected.
The only difference between these two sites is the .net version (and the associated nuget packages), so I can only think that it's a problem with the environment or a bug, and I'm not really sure how to confirm either...
I published the .net 8 site here: https://dev.mcallengaragesales.com which loads and connects and seems to run fine on Firefox, edge, chrome on both desktop and mobile.
I upgraded that same site to .net 9 and published it here: https://dev9.mcallengaragesales.com and on firefox desktop I get this error:
On chrome desktop I get a similar but slightly different error:
On mobile, the .net 9 site simply shows the standard blazor error with reload message at the footer (I don't know how to see dev tools on android to get more detailed errors)...
As an attempt to eliminate any other variables, I created a brand new, clean, default blazor web site for .net 9 using server interactive in visual studio and published that here: http://test.mcallengaragesales.com
and in firefox on THAT site, I get this error:
and this on edge:
I am at a total loss for what to do. I want to publish the .net 9 site live today but I can't with this issue. I'm hoping it's an environment thing as opposed to a bug in my code (or .net) but at the same time I have no idea what to tell my host to try and remedy the issue...
Does anyone else get any different result than I am showing above? Any ideas what might be wrong here? anything more I can provide to give more insight?
many thanks for taking a look!
The text was updated successfully, but these errors were encountered: