Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catching Session Expire Event

    IS there any way to show the user my "Session Expired" page on the Session Expiry event (if there is such a thing)? I've been doing this up until now by checking the value of one of my Session variables. But, it would be cooler and more reliable if there was an event I could catch.

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Catching Session Expire Event

    I'm not aware of any way to catch an actual SessionExpired event. It sounds like the way you're doing it is the same way I usually do - just check for the presence of a Session variable.

    I have not had very good luck with the Global ending events (such as Application_End or Session_End). They don't fire consistently for some reason. Maybe the problem is with the developer (me). <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    The Start events (Application_Start, Session_Start) seem to work fine, however.

  3. #3
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Catching Session Expire Event

    Thanks Mark. I guess I'll look into the Session_End event a little more closely.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Catching Session Expire Event

    What about a client-side pop-up/alert/refresh using JavaScript? I think you would use the setTimeout() method.

  5. #5
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Catching Session Expire Event

    I guess I would put this script on each page?

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Catching Session Expire Event

    I think it would have to be on each page, and would need to be run in an onLoad event handler in the BODY tag or in the body itself in order to initialize the timer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •