question

AshvinRavishankar-8911 avatar image
0 Votes"
AshvinRavishankar-8911 asked Bruce-SqlWork answered

Could not reconnect to the server. Reload the page to restore functionality - Blazor Framework

Hi,

We had setup our Blazor application and hosted it in Azure. Often we encounter the below error description and the user has to reload the page to make it working. We had been referring some articles related to the above. However the issue still persists and we are unable to fix the issue.

Could not reconnect to the server. Reload the page to restore functionality

Can someone please help on fixing the issue in a Blazor application. Help is very much appreciated.

Regards,
Ashvin



dotnet-aspnet-core-generaldotnet-aspnet-core-blazor
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Blazor Server? WASM?

Since the community cannot see or debug your code, what troubleshooting steps have you preformed? Can you explain how your application works? Can you provide sample code that reproduces this issue?

0 Votes 0 ·

Hi @AshvinRavishankar-8911,

Agree with AgaveJoe, besides before hosting the application in Azure, whether it works well in the development/local environment?

0 Votes 0 ·

1 Answer

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

if you check the code:

https://github.com/dotnet/aspnetcore/blob/52eff90fbcfca39b7eb58baad597df6a99a542b0/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts

the error happens when the connection id on the server is not found. this implies you are using blazor server, and the server blazor instance for the connection is not found. maybe the server recycled, crashed or the affinity cookie is not correctly configured.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.