Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle Blazor's "attempting to reconnect to server"?

I have a Blazor server-side app and after a period of inactivity, the message "Attempting to reconnect to server..." appears.

I need to extend the inactivity period.

My questions:

  1. Is this maybe related to the authentication or application cookie lifetime?
  2. Is it possible to extend the timeout, and if yes, how?
  3. Is it possible to manually disconnect the circuit to test the reconnection code?
like image 556
Ivan-Mark Debono Avatar asked Oct 12 '25 08:10

Ivan-Mark Debono


1 Answers

They addressed this in .NET 9 release.

Improved server-side reconnection experience: When the user navigates back to an app with a disconnected circuit, reconnection is attempted immediately rather than waiting for the duration of the next reconnect interval. This improves the user experience when navigating to an app in a browser tab that has gone to sleep.

You can read the full list of improvements here

like image 140
Nikolay Rogchev Avatar answered Oct 14 '25 22:10

Nikolay Rogchev