Sesson_End in Global.asax

Discussion in 'ASP .Net' started by Alex Smotritsky, Apr 15, 2004.

  1. Session_End doesn't seem to get fired when a user closes their browser
    as I thought it would. Since this seems to be the case, how do I execute
    code that I want executed when a user closes the browser?



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Alex Smotritsky, Apr 15, 2004
    #1
    1. Advertisements

  2. The session end event is not linked to a user closing their browser.
    The session end event occurs when the session timer elapses.
    You could use some client side code that fires on the window.close event but
    you can never be sure that this is going to work.
    I think you should re-think you problem. What it is you are trying to
    achieve?

    A

    A
    "Alex Smotritsky" <> wrote in message
    news:...
    > Session_End doesn't seem to get fired when a user closes their browser
    > as I thought it would. Since this seems to be the case, how do I execute
    > code that I want executed when a user closes the browser?
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Andrew de la Harpe, Apr 15, 2004
    #2
    1. Advertisements

  3. A database developer I'm working with wants me to call one of his stored
    procedures when a session ends for user tracking/logging purposes.



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Alex Smotritsky, Apr 15, 2004
    #3
  4. What are the "tracking/logging purposes?" The reason I ask is that it may
    not be necessary to run the SP when the browser closes. It may indeed be
    acceptable to run them when the Session ends, depending upon the specific
    requirements.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Alex Smotritsky" <> wrote in message
    news:...
    > A database developer I'm working with wants me to call one of his stored
    > procedures when a session ends for user tracking/logging purposes.
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Kevin Spencer, Apr 15, 2004
    #4
  5. Ok but this doesn't really explain what you or the DBA are trying to achieve
    so it's hard to help.
    A
    "Alex Smotritsky" <> wrote in message
    news:...
    > A database developer I'm working with wants me to call one of his stored
    > procedures when a session ends for user tracking/logging purposes.
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Andrew de la Harpe, Apr 15, 2004
    #5
  6. If I understand correctly, what you're getting at is that in InProc
    sessionState mode, some number of minutes (timeout or less) after the
    user closes the browser the Session_End event in Global.asax will be
    fired so I can run some code then and there?



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Alex Smotritsky, Apr 15, 2004
    #6
  7. i'm looking for help at a more general level. inproc mode supports
    session_end. i want to know if session_end will always get fired when
    the session time ends even if a user closes their browser or goes to
    another website.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Alex Smotritsky, Apr 17, 2004
    #7
    1. Advertisements

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. VSK
    Replies:
    1
    Views:
    899
    Alvin Bruney
    Jul 29, 2003
  2. Daniel Bass
    Replies:
    2
    Views:
    7,065
    Daniel Bass
    Dec 31, 2003
  3. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    1,048
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  4. Kostia

    Sesson_End called too early

    Kostia, Oct 21, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    453
    Kostia Grebelsky
    Oct 21, 2004
  5. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,301
    Mark Rae
    May 23, 2006
Loading...

Share This Page