White screen if the user is left without work on asp.net page

There are several tabs on one of the pages on our ASP.NET website. Each tab represents different content and moves from one tab to another, loading the entire page. If I am on one of the tabs now and stand there for about a minute or more, and then switch to another tab, only a white blank screen will appear. (without the source code for the info page for this in the browser).

Unfortunately, this same problem does not reproduce at all for the same website in a lower test environment. The problem only occurs in the Production version of the website.

Is there an IIS parameter or web.config parameter that I have to change to solve this problem. Since I believe that the source code of the concerned webpage would not be the reason.

+8
source share
3 answers

This is likely due to the fact that the session timeout has reached the limit that ends with the session.

In this case, you have three possible solutions:

First

You can try editing the web.config located in the root application to extend the session timeout. Try something like this:

 <sessionState mode="StateServer" timeout="500"> </sessionState> 

According to MSDN, you can set the timeout to 525,601 minutes (1 year).

Second

If it does not work and you have access, you can try editing the timeout in IIS:

Open IIS, click Application Pools, select the application pool for your application.

Right click on it, select "Properties".

On the "Performance" tab, set the wait timeout as the desired minutes for "shutting down work processes after downtime for ..... minutes".

IMPORTANT: in addition to this, you must set the timeout in web.config as described above.

Third

You can create an ajax function that will execute in the background without waiting for the session to end:

 function keepSessionAlive(mod) { mod.open("GET", "blank.html", true); mod.onreadystatechange = function() { if (mod.readyState == 4) { document.getElementById("#blankDiv").innerHTML = mod.responseText; } }; mod.send(null) } setInterval('keepSessionAlive()', 100000); 

What is it. Hope this helps.

+5
source share

Is there any custom http module? Can we take a look at the aspx apce page and the code behind? This happened to me when I used elmah, but in a completely different scenario.

Another may be related to what is indicated by another. Hope this helps.

+1
source share

I would open chome dev or firebug tools if in firefox. If in firebug, I would look at the net and console tabs and see what actually happens from a network perspective. It should be easy to look at traffic in dev and compare with production. I guess they are not the same, and that will instantly point you in the right direction.

Fiddler is also an option if you want to watch traffic as if you were an average person.

+1
source share

All Articles