White screen issue if an user stays idle in an asp net page


ASP.NET is a popular programming language used for web applications. However, like any other programming language, it has its own set of challenges and issues that developers may encounter. One such issue is the white screen problem that occurs when a user stays idle on an ASP.NET page.

The Problem

When a user stays idle on an ASP.NET page for a period of time, they may encounter a white screen when they try to interact with the page again. This can be frustrating for users and can lead to a poor user experience.

The Cause

The white screen issue is typically caused by the timeout setting in ASP.NET. By default, ASP.NET has a session timeout of 20 minutes. This means that if a user does not interact with the page for 20 minutes, their session will expire and they will be to the login page or a default error page.

The Solution

To solve the white screen issue, you can modify the session timeout setting in your ASP.NET . There are two ways to do this: through the web.config file or programmatically in your code.

Modifying Session Timeout in web.config

To modify the session timeout in the web.config file, locate the .web section and add or modify the sessionState element. Set the timeout attribute to the desired value in minutes. For , to set the session timeout to 30 minutes, you can use the following code:


Modifying Session Timeout Programmatically

If you prefer to modify the session timeout programmatically, you can do so in your ASP.NET code. You can set the session timeout value in the Session_Start in the Global.asax.cs file. Here's an example:

protected void Session_Start(object sender, EventArgs e)
    Session.Timeout = 30;


The white screen issue in ASP.NET can be resolved by modifying the session timeout setting. By increasing the session timeout value, you can prevent users from encountering a white screen when they stay idle on a page. Whether you choose to modify the session timeout in the web.config file or programmatically in your code, it's to ensure a smooth user experience by addressing this issue.

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

Table of Contents