Catch a Session Timeout?

Discussion in 'ASP .Net' started by Lars Netzel, Jan 24, 2005.

  1. Lars Netzel

    Lars Netzel Guest

    Hi

    I want to alert the user via a javascript alert when the Session has time
    out.

    how do I do this?

    best regards/
    Lars Netzel
     
    Lars Netzel, Jan 24, 2005
    #1
    1. Advertising

  2. You can only guess without breaking the stateless model. In most
    applications, the page is either redirected to a logout after a certain
    amount of time (META tags), or a timer is placed in the app that fires a
    message, or both. Without querying the server, you cannot determine if a
    session has timed out.

    ---

    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************

    "Lars Netzel" wrote:

    > Hi
    >
    > I want to alert the user via a javascript alert when the Session has time
    > out.
    >
    > how do I do this?
    >
    > best regards/
    > Lars Netzel
    >
    >
    >
     
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Jan 24, 2005
    #2
    1. Advertising

  3. Lars Netzel

    Cole Trickle Guest

    I have previously used a session variable that stores unneeded data. At the
    start of every page I query the session variable and if it's empty then I
    assume the session has timed out and I alert the user with a JavaScript
    alert
    may not be the best way but it worked for me.
    hope this helps

    "Lars Netzel" <> wrote in message
    news:%...
    > Hi
    >
    > I want to alert the user via a javascript alert when the Session has time
    > out.
    >
    > how do I do this?
    >
    > best regards/
    > Lars Netzel
    >
     
    Cole Trickle, Jan 24, 2005
    #3
  4. Lars Netzel

    Lars Netzel Guest

    That's a pretty good solution but unfortunately that won't work for me fully
    cause I aslo want to write to a logtable What User (stored in thesession)
    has times out.

    I was hoping there woudl be a some sort of event when the session times out

    /lars



    "Cole Trickle" <> wrote in message
    news:ct34eo$r4$1$...
    >I have previously used a session variable that stores unneeded data. At the
    >start of every page I query the session variable and if it's empty then I
    >assume the session has timed out and I alert the user with a JavaScript
    >alert
    > may not be the best way but it worked for me.
    > hope this helps
    >
    > "Lars Netzel" <> wrote in message
    > news:%...
    >> Hi
    >>
    >> I want to alert the user via a javascript alert when the Session has time
    >> out.
    >>
    >> how do I do this?
    >>
    >> best regards/
    >> Lars Netzel
    >>

    >
    >
     
    Lars Netzel, Jan 25, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Do
    Replies:
    2
    Views:
    6,432
  2. bruce barker

    Re: ASPX Page Timeout - Session Timeout

    bruce barker, Jul 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    11,145
    ASP.Confused
    Jul 20, 2004
  3. =?Utf-8?B?Q3JhaWc=?=

    formsauthentication timeout & session timeout

    =?Utf-8?B?Q3JhaWc=?=, Aug 10, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,693
    =?Utf-8?B?RU5JWklO?= .enizin.net>
    Aug 10, 2005
  4. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,392
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,334
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page