Session_End

Discussion in 'ASP .Net' started by Guadala Harry, Oct 11, 2004.

  1. Just wondering if Session_End *always fires* for every Session. I know that
    IIS times out sessions after a default 20 min (unless changed) and there's
    no way to know when a user actually closed a browser (unless I provide a
    "log out" button that kills the session explicitly, and we can't guarantee
    the user will click on that). What I am wondering if there are there
    well-known/documented circumstances under which Session_End will NOT fire
    (regardless of what the user is doing/not doing in the browser)?

    Thanks.

    -GH
     
    Guadala Harry, Oct 11, 2004
    #1
    1. Advertising

  2. Hi Harry,

    I was not able to trace what exactly you are looking out, but what i
    assume from your post is that you need scenario's where the Session_End will
    not be fired.
    And the answer to this is, The Session_End will not be fired if your session
    is not running in the same process with the IIS as the browser generates the
    session's with the help of IIS. which is the web server. The best example i
    can give is In the web.config set the Session MOde as StateServer or
    SQLserver and write some code in the Session_End the Session_End will not be
    fired.



    "Guadala Harry" wrote:

    > Just wondering if Session_End *always fires* for every Session. I know that
    > IIS times out sessions after a default 20 min (unless changed) and there's
    > no way to know when a user actually closed a browser (unless I provide a
    > "log out" button that kills the session explicitly, and we can't guarantee
    > the user will click on that). What I am wondering if there are there
    > well-known/documented circumstances under which Session_End will NOT fire
    > (regardless of what the user is doing/not doing in the browser)?
    >
    > Thanks.
    >
    > -GH
    >
    >
    >
     
    =?Utf-8?B?UHJhdmVlbiBL?=, Oct 11, 2004
    #2
    1. Advertising

  3. Actually - just the opposite - I would like to have some code that executes
    when *any/every* session ends. There would be no point in writing that code
    if I could not be sure (as much as anything can be certain in a computer)
    that Session_end would fire for every session end. So, asking about the
    known cases where session_end does not fire - if there are any such
    well-known cases - would give me an idea of whether or not to proceed with
    writing the code. E.g., if there were 2 or 3 scenarios where it does not
    fire, but they are not relevant to my application - then I'd go ahead and
    write the code. Just wondering what those scenarios would be if there are in
    fact any such scenarios.

    So from your response, it appears that session_end is expected to always
    fire under normal circumstances (nothing special for state server, etc).
    Correct?

    GH



    "Praveen K" <> wrote in message
    news:...
    > Hi Harry,
    >
    > I was not able to trace what exactly you are looking out, but what i
    > assume from your post is that you need scenario's where the Session_End

    will
    > not be fired.
    > And the answer to this is, The Session_End will not be fired if your

    session
    > is not running in the same process with the IIS as the browser generates

    the
    > session's with the help of IIS. which is the web server. The best example

    i
    > can give is In the web.config set the Session MOde as StateServer or
    > SQLserver and write some code in the Session_End the Session_End will not

    be
    > fired.
    >
    >
    >
    > "Guadala Harry" wrote:
    >
    > > Just wondering if Session_End *always fires* for every Session. I know

    that
    > > IIS times out sessions after a default 20 min (unless changed) and

    there's
    > > no way to know when a user actually closed a browser (unless I provide a
    > > "log out" button that kills the session explicitly, and we can't

    guarantee
    > > the user will click on that). What I am wondering if there are there
    > > well-known/documented circumstances under which Session_End will NOT

    fire
    > > (regardless of what the user is doing/not doing in the browser)?
    > >
    > > Thanks.
    > >
    > > -GH
    > >
    > >
    > >
     
    Guadala Harry, Oct 11, 2004
    #3
  4. Guadala Harry

    Patrice Guest

    Application recycled likely.

    I would see things the other way round :
    - do I have to use Session_End ? If not I avoid it.

    For example the SQL Server session state provider uses a job to perform
    housekeeping tassks in the DB regularly...

    Patrice
    --

    "Guadala Harry" <> a écrit dans le message de
    news:...
    > Actually - just the opposite - I would like to have some code that

    executes
    > when *any/every* session ends. There would be no point in writing that

    code
    > if I could not be sure (as much as anything can be certain in a computer)
    > that Session_end would fire for every session end. So, asking about the
    > known cases where session_end does not fire - if there are any such
    > well-known cases - would give me an idea of whether or not to proceed with
    > writing the code. E.g., if there were 2 or 3 scenarios where it does not
    > fire, but they are not relevant to my application - then I'd go ahead and
    > write the code. Just wondering what those scenarios would be if there are

    in
    > fact any such scenarios.
    >
    > So from your response, it appears that session_end is expected to always
    > fire under normal circumstances (nothing special for state server, etc).
    > Correct?
    >
    > GH
    >
    >
    >
    > "Praveen K" <> wrote in message
    > news:...
    > > Hi Harry,
    > >
    > > I was not able to trace what exactly you are looking out, but what i
    > > assume from your post is that you need scenario's where the Session_End

    > will
    > > not be fired.
    > > And the answer to this is, The Session_End will not be fired if your

    > session
    > > is not running in the same process with the IIS as the browser generates

    > the
    > > session's with the help of IIS. which is the web server. The best

    example
    > i
    > > can give is In the web.config set the Session MOde as StateServer or
    > > SQLserver and write some code in the Session_End the Session_End will

    not
    > be
    > > fired.
    > >
    > >
    > >
    > > "Guadala Harry" wrote:
    > >
    > > > Just wondering if Session_End *always fires* for every Session. I know

    > that
    > > > IIS times out sessions after a default 20 min (unless changed) and

    > there's
    > > > no way to know when a user actually closed a browser (unless I provide

    a
    > > > "log out" button that kills the session explicitly, and we can't

    > guarantee
    > > > the user will click on that). What I am wondering if there are there
    > > > well-known/documented circumstances under which Session_End will NOT

    > fire
    > > > (regardless of what the user is doing/not doing in the browser)?
    > > >
    > > > Thanks.
    > > >
    > > > -GH
    > > >
    > > >
    > > >

    >
    >
     
    Patrice, Oct 11, 2004
    #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. Chris Sibel

    Session_End Not Firing

    Chris Sibel, Jul 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,990
    Naveen K Kohli
    Jul 2, 2003
  2. Kenn Ghannon

    Session_End never fires

    Kenn Ghannon, Jul 8, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    502
    Kevin Spencer
    Jul 10, 2003
  3. Burak Kadirbeyoglu

    session_end and re-login

    Burak Kadirbeyoglu, Jul 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    567
    Tu-Thach
    Jul 10, 2003
  4. Steve M
    Replies:
    5
    Views:
    562
    Yan-Hong Huang[MSFT]
    Jul 31, 2003
  5. Kevin Spencer

    Re: Session_End

    Kevin Spencer, Aug 15, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    481
    Kevin Spencer
    Aug 15, 2003
Loading...

Share This Page