Blazor server app - sign out - reload warning messge after 230 seconds

Manokaran, Murugesan (Muru) 22 Reputation points

we have a core mvc web application and added blazor server components and deployed to Azure App Service (Windows)

its showing reload warning after 230 seconds.

can anyone help/advise to resolve this issue?

Microsoft Technologies based on the .NET software framework.
3,598 questions
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,492 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,328 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce ( 60,866 Reputation points

    Check that websockets are enabled. You will also want to setup server affinity

    0 comments No comments

  2. brtrach-MSFT 15,791 Reputation points Microsoft Employee

    @Manokaran, Murugesan (Muru) To add to the suggestion from Bruce, please consider the below if enabling web sockets does not work.

    The reload warning message you are seeing is due to the default timeout value of the SignalR connection in Blazor Server. By default, the SignalR connection will be closed and re-established after 30 seconds of inactivity. If the connection is not re-established within 230 seconds, the user will see a reload warning message.

    To resolve this issue, you can increase the timeout value of the SignalR connection. You can do this by adding the following code to your Startup.cs file:

    services.AddSignalR(options =>
        options.ClientTimeoutInterval = TimeSpan.FromSeconds(60 * 5); // 5 minutes

    This will increase the timeout value to 5 minutes. You can adjust the value as per your requirement.

    Additionally, you can also try enabling the "Always On" feature in your Azure App Service. This will ensure that your app is always running and the SignalR connection is not closed due to inactivity. To enable "Always On", go to your App Service in the Azure portal, click on "Configuration" and then toggle the "Always On" option to "On".