Results 1 to 3 of 3

Thread: Session_OnEnd

  1. #1
    Join Date
    Dec 1969

    Default Session_OnEnd

    Unfortunately I think I may know the answer to my question before I ask, but I thought I might throw it out anyway. I am trying to save the query string from a session BEFORE it ends. I was hoping to use the Session_OnEnd in the global.asa file to backup the querystring to a DB table. Unfortunately it looks like the function is called after the session times out and the querystring is dropped. I was hoping that the function would be called just before it times out. Does anyone have any insight, or suggestions as to how I could save the query string when the session times out.

  2. #2
    Join Date
    Dec 1969

    Default RE: Session_OnEnd

    You&#039;re right about not being able to do it with Session_OnEnd as OnEnd and OnStart can&#039;t use the Request or Response objects.<BR><BR>The easiest way would be to include something at the top of every page that always runs but in order for it to be of any use you&#039;d have to store it against the user somehow. Can&#039;t use the Session as that&#039;s going to timeout so I guess you&#039;d put it in a database against their user ID?<BR><BR>If you really wanted to you could set a JavaScript timeout to the server timeout on each page that would fire up another window, passing the querystring (and some sort of user ID) to an asp page that stores info. But I don&#039;t really see the point.

  3. #3
    Join Date
    Dec 1969

    Default It doesn't...

    Make sense to use the Request of Response objects in the global.asa anyway, as the settings there encompass either the lifespan of the IIS application, or the session. Not individual page requests.<BR><BR>He could store the QueryString (as you suggested) in a Session variable which should be available in the Session_OnEnd subroutine. However, I don&#039;t know if the session contents times out before or after the subroutine is called. Logically, I would guess after. However, I&#039;m not sure.<BR><BR>Craig.

Posting Permissions

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