aspnetcore: Reload the browser when the circuit ID is unknown
If I launch a components app with dotnet watch run - the reconnection feature doesn’t ever seem to do its thing.

I can retry, and it will successfully connect (see console output) - but it never updates the UI.
My guess is that this happens because the circuit is gone - it’s a new process after all. We should see if we can improve this for inner loopness, and figure out a better experience by default for the case where the circuit is gone.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 5
- Comments: 15 (12 by maintainers)
We discussed this and we think it would help that if the circuit ID is unknown we reload the page.
Duplicated https://github.com/dotnet/aspnetcore/issues/38305 against this issue. Thread summary is there are concerns with the existing documented approach as it overrides the existing reconnection behavior.
We may want to consider adding additional doc details on the reconnection behavior or provide alternate reconnection configurability (or automatic reloads).
I think that behavior should be configurable. In development mode a reload is fine and most likely expected.
In production, there could be a lot of issues (i.e. server node accidentally or gracefully restarted) and that might involve trying to persist some sort of session state when the server gracefully shuts down and trying to restore that state when a new circuit starts.
Also, the user might want to be informed when he should expect an application reload and possibly loss of data.
Here is how the user experience looks in my case.
User loads page, works with the app, perhaps fills the form halfway through. They go for a snack and when they come back they see that their work is gone as the only thing they can do is to refresh the browser. Great for the banking app, but my users complain.
Disabling idle timeout would help but app pool can still recycle at any time unless this is also disabled. Corporate IT is not happy to change any of the application pool settings anyway. Similarly with my hobby stuff - online hosting providers are saying to go and buy VPS if I need such customization.
tl;dr I know this is a long shot but are there any plans to improve user experience with blazor after the application restart? Maybe persist user session state in the browser?