Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sessions Expiring after 3 minutes

Status
Not open for further replies.

mateobus

Programmer
Aug 20, 2007
28
US
Hello all, our company recently launched a revised version of an existing application today, and our customer service department has been complaining that they are having to log in to the admins section of the site every 2 or 3 minutes, when it used to last for more than an hour. I have searched for this problem, and examined my various settings, and I still can't seem to figure out why the sessions are expiring so fast.

Here is some information: The original project was vb.net (1.1) made with visual studio 2003, and the new project was upgraded to vb.net (2.0) made with vs 2005, though 99% of the code is the same.

The servers that the projects run on are the exact same, and no iis settings were changed (though I included those below as well).

Snippet of web.config:

<sessionState mode="InProc" cookieless="false" timeout="120" .../>

Also, I noticed that we don't have a forms tag in the web.config, so maybe that could contribute to the problem? I didnt want to add that since I don't know exactly what it is for.

Snippet of Global.asax:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Session.Timeout = 25

IIS Settings:
Connection Timeout - 120 seconds
Application Configuration - Enable session state 20 minutes
ASP script timeout - 90 seconds

Any ideas or suggestions are welcomed. Thanks in advance.
 
There are only 3 places I can remember where to control session timeout. They are:

Anywhere in Code via "Session.Timeout = X"
Web.Config file
IIS Application Settings


If you have checked them all, then have you tested the timeout of the application yourself? How long did your testing take to timeout?

Not to be overly hard on users, but they often times mis-interpret the amount of time that a session has been idle. They will request a page (which is when the clock starts) fill in some data, take a call, enter some data, place a call, enter some data, and so on... and they tend to think that because they are entering data on a page that they are sort of resetting the session clock. Then their session times out and they get mad.

I would start doing some things like logging the session.timeout values on all Session_End Events in the global.asax. I would think about changing this "Session.Timeout = 25" to this "Session.Timeout = 60". I would at least put in a JavaScript Alert popup script that notifies the user when their session is getting close to timing out on each important page. I may even think about moving away from session state and into using cookies.

Just some things to think about anyway.

Senior Software Developer
 
Check your Application Event Logs to make sure your worker process isn't crashing and restarting.. this happens fairly quickly so most people won't know that the web app crashed and restarted, giving the impression that it's timing out.

Hope this helps,

Gorkem.

Oxigen - Next generation business solutions
-----------------------------
Components/Tools/Forums/Software/Web Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top