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.

 
Really this belongs in the ASP forum - you picked VB.NET.

I don't really know ASP, but something does spark an idea.

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

60 * 2 = 120

About 2 min for session to clear - my guess, is timeout is in seconds.
 
You need to see if the code changes the session timeout anywhere else. The sessionState timeout in web.config is in minutes (not seconds) and when a session starts it gets reset to 25 minutes according to the code you have published.

Alternatively an exception is occurring that is causing the session to be abandoned. Look for code that calls Session.Abandon.

Also check that you are running the application in a pool that is dedicated to ASP.NET 2 as you must not attempt to run ASP.NET 1 applications in the same pool.



Bob Boffin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top