We fully support .NET 9, the most productive, modern, secure, intelligent, and performant release of .NET yet.
Blazor is better than ever in .NET 9 to empower you to build beautiful modern web & hybrid apps. Blazor apps using interactive server rendering (Blazor Server) benefit from a new reconnection experience that has a friendlier UI, reconnects to the server faster, and automatically handles reloading the page if the user’s connection has been lost.
By default, Interactive Server components enable compression for
WebSocket connections. However, you might see websocket connection problem with .Net 9.0.0 if you host app in IIS OutOfProcess mode.
Error: WebSocket closed with status code: 1006 (no reason given).
Solutions:
1. change to use InProcess mode with dedicated pool.
2. or
disable compression, use the DisableWebSocketCompression
option:
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode(c => c.DisableWebSocketCompression = true);
Note: The new release for .Net 9 will fix such issue.
Article ID: 2287, Created: November 14, 2024 at 12:11 AM, Modified: November 14, 2024 at 1:17 AM