Session Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    #1

    Session Question

    Hi all,

    I've been given an old asp.net project to update. The project uses its
    own authentication system and small session object to maintain state -
    it's running off a mysql server.
    One issue with this is session timeout occuring for logged in users.
    Currently, session timeout is set at 20.
    I need to extend the session timeout of rthose logged in. Would the
    following work?
    In the session object creation (which means login was a success), if I
    place the following code:

    HttpContext.Cur rent.Session.Ti meout = 7600;

    Would this set the session of all logged in users to 12hrs, but keep
    unlogged in users to 20 minutes?
    if not, any over work arounds to this.

    Thanks.
  • Mark Rae [MVP]

    #2
    Re: Session Question

    "Paul" <Gef.Mongoose@g mail.comwrote in message
    news:97fb6d26-18ab-4fd9-83cc-7f33d650775a@1g 2000hsl.googleg roups.com...
    if not, any over work arounds to this.
    I must admit I've never tried this, but the following forum post implies
    that it's possible, at least with Forms Authentication:
    A broad category of Microsoft tools, languages, and frameworks for software development. Designed to support developers in building, debugging, and deploying applications across various platforms.


    Maybe this could be adapted to your requirements...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • George Ter-Saakov

      #3
      Re: Session Question

      Look at my article

      It has a nice workaround.

      George.

      "Paul" <Gef.Mongoose@g mail.comwrote in message
      news:97fb6d26-18ab-4fd9-83cc-7f33d650775a@1g 2000hsl.googleg roups.com...
      Hi all,
      >
      I've been given an old asp.net project to update. The project uses its
      own authentication system and small session object to maintain state -
      it's running off a mysql server.
      One issue with this is session timeout occuring for logged in users.
      Currently, session timeout is set at 20.
      I need to extend the session timeout of rthose logged in. Would the
      following work?
      In the session object creation (which means login was a success), if I
      place the following code:
      >
      HttpContext.Cur rent.Session.Ti meout = 7600;
      >
      Would this set the session of all logged in users to 12hrs, but keep
      unlogged in users to 20 minutes?
      if not, any over work arounds to this.
      >
      Thanks.

      Comment

      Working...