Session object timout

From: Steve Peterson (speterson_at_nospam.com)
Date: 12/26/04


Date: Sun, 26 Dec 2004 21:00:22 +0100

Hi

I have an application that is designed for multi clients, therefore users
must go through a login page. Upon logging in I set some properties in a
class, one of which is the user id (integer) retrieved from the SQL db and
also the company id that successfully logged in. I then add this this class
to a session object which I named "CurrentUserInfo".

Since the app relies on retrieving only information for the company of which
the user belongs, I added a small check on the Page_Load of each web form to
make sure that the session id of the user not zero (has to be - it's a
identity from table). If the check fails then I redirect the user back to
the login page so the have to login again, thus recreating the session
object which holds the class I mentioned above.

Since several of our clinets like to use this app like a windows app, or
rather the log in and then leave thier browser open while they talk on the
phone, go to lunch et.. they complained that it was inconvient that they had
to always relog in. So in the web.config I upped the sessionstate "Timeout"
value to 180 (3 hours).

However, I'm still getting complaints that they are getting bumped back to
the login page. I tested this myself by loggin in and leaving my browser
window open, and sure enough I get bumped after 20-30 min. It varies, but
certainly not 3 hours.

Does anyone have any ideas on why my session object is timing out?

TIA

Steve



Relevant Pages

  • Cannot open database requested in login ASPState. Login fails. Login failed for user sa.
    ... Visual Studio app, I got round to the option for storing the state in SQL ... sessionState statement (so the app runs with the default in-proc session ... What is causing the login failure? ... Cannot open database requested in login 'ASPState'. ...
    (microsoft.public.sqlserver.security)
  • new session created when changing pages
    ... I have a set of pages with C# code attached to manage session information. ... They hang their info off of the session string and store it in a MSDE table. ... I have all of this code working well in one app and started another app which ... find that I am get redirected every time I login back to my login because ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Please! Doesnt anyone know a better way to do this?
    ... account, they need to automatically be directed to the page to enter data ... session variable on the Account page. ... I assume here that you're checking a database when the user attempts to ... When a new user attempts to login or clicks to register, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Session timeout problem...
    ... During the login, in code behind I have dynamically created a public shared ... When the user clicks logout menu option from my app I also have code behind ... session will time out. ... ran some test code in the application start sub in global.ascx to log each ...
    (microsoft.public.dotnet.general)
  • Re: nooB PhP login using MySQL
    ... This PC has MySQL and IIS configured and running. ... how do I prevent users from bypassing the login? ... create a random string and store in session on server, ... euphemism for md5) but now that there are secure ways, ...
    (comp.lang.php)