I've developed an application in .NET 8 Blazor Server (deployed to Azure with a SignalR service). The user often starts to enter some info (often, quite a lot of info) in a form, gets pulled onto some other issue and then comes back to find the server has disconnected; the screen is grayed and the message at the top of the screen is: "Could not reconnect to the server. Reload the page to restore functionality". The time it takes for this disconnection seems random.
The client would like to have the connection remain active for at least 2 hours from the last UI activity. I have tried:
- Chrome, Settings, Performance, Memory Saver: OFF
- Chrome, Settings, Performance: Adding the site to "Always keep these sites active"
- Program.cs: builder.Services.AddServerSideBlazor: set DisconnectedCircuitRetentionPeriod
- _Layout.cshtml: Adding a JS script that includes "builder.withServerTimeout(7200000)"
Is there a way to fix this? Or, did we develop using the wrong technology?
Thanks in advance.