1

We have a huge form with hundred fields. If the user goes to fetch a coffee before submitting or saving it the SignalR connection may shut down and the entries are lost. Is there a good approach how to recover the data when the users clicks on the reload button?

I have tried the Circuit Handler but it seems more for statistics and logging. So far I could save the form data to session storage whenever a form value is changed. When the user reloads the page I could compare some meta data and if it's match restore the form data from the session storage.

Is there a better approach?

Gepard
  • 11
  • 2
  • Technically the SignalR connection should remain open, regardless to how long the window is open. If you leave the form open with developer tools, do you see any errors stored in there? I ask this because sometimes there is a timer or something running in the background and that method may error out. Is the site using IIS? Maybe you need to make a modification to IIS? – jon.r Feb 14 '23 at 17:39
  • https://stackoverflow.com/questions/74638451/reconnecting-issue-in-blazor-server/74642664#74642664 – maciek Feb 14 '23 at 17:55
  • Thanks for your answer jon.r. I host the app on azure and having enabled 'Always on' to avoid disconnection by an idle web server. The app is not causing the disconnection. I think it is when the computer goes into power save mode. We can not control this settings for our customers (of course). So in my opinion it can happen that the app disconnects after some time of leaving the computer unattended (or is there a way to avoid it?). So in my opinion there is a need for a good way to avoid data loss when reconnection fails and the user has to click the reload button. – Gepard Feb 15 '23 at 07:10

0 Answers0