Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

ClientTimeoutInterval and KeepAliveInterval not working as expected?

$
0
0

I'm having issues with Blazor Server on .NET 9 where it will disconnect and I'll get the "Rejoining the server" .

So I added the following code to my program.cs:

builder.Services.AddServerSideBlazor().AddHubOptions(options =>{    options.ClientTimeoutInterval = TimeSpan.FromMinutes(30);    options.KeepAliveInterval = TimeSpan.FromMinutes(15);});    

This has actually made the problem worse, I now get the "Rejoining the server" within 2-3 seconds of any long running database query (server side). After about 60 seconds, I'll get a "Rejoined failed..." message and then reverts back to "Rejoining the server".

This is from my local VS 2022 IDE session, haven't deployed to a test server.

My end users commonly complain about getting the "Rejoining the server" as they frequently walk away from their computers (lock screen will kick in after 5 minutes). If they are in the middle of working on my app, they'll basically lose whatever work they entered as a refresh is forced.

My users are definitely NOT happy about his issue and I've been trying to solve it but nothing ...

The "DisconnectedCircuitRetentionPeriod" is no longer an option for .NET 9 Blazor and the suggested use is to go the route of

@inject PersistentComponentState PersistentComponentState

This however will required considerable re-work as I would need to specify A LOT of page/component properties ... just not practical.

Is this just a massive weakness in Blazor .NET 9 ... or will .NET 10 Blazor come up with a viable (easy to implement) solution?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>