Global.asa and Sub Session_OnEnd

Results 1 to 2 of 2

Thread: Global.asa and Sub Session_OnEnd

  1. #1
    Join Date
    Dec 1969

    Default Global.asa and Sub Session_OnEnd

    I am interested in executing some cleanup code on my database when a user’s session expires. Because the Session Object is only available if the user has cookies enabled I am considering using the Global.asa file to accomplish this. Particularly the Sub Session_OnEnd.<BR><BR>If I use Session_OnEnd within the Global.asa file, am I correct in thinking that this is something that the server handles and is independent of weather the user has cookies enabled?<BR><BR>Are there circumstances when this code would not be executed?<BR><BR>Is there any problem with opening a connection to a database through the Global.asa file?<BR><BR>Is it advisable that I use this method or is there a better way to accomplish this task?

  2. #2
    Join Date
    Dec 1969

    Default RE: Global.asa and Sub Session_OnEnd

    Session_onend always fires, but some operations may fail, such as trying to use database objects - it&#039;s because the protection level required by ADO is more than IIS can provide for an unattended operation like Session cleanup.<BR><BR>It&#039;s fine to use a FreeThreadedDomdocument in the (as I&#039;ve demoed in a recent article on my site) but ADO will usually fail.<BR><BR><BR>j<BR>

Posting Permissions

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