Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

global.asa trigger

Status
Not open for further replies.

leahyj

MIS
May 5, 2004
107
0
0
US
Is it true that the global.asa session events are only triggered when the first asp page in the application is loaded?

If that is true, that is a shame.


Thanks for your knowledge.
 
There are 2 session events in global.asa: Session_OnStart and Session_OnEnd.


Session_OnStart will trigger only once per session: That is when the first asp page of an application is hit, doesn't have to always be the same page (should be).

Session_OnEnd will trigger when a Session.Abandon is incurred or after a session times out.

If that is true, that is a shame.

What's a real shame is the unreliability of those events firing when they should. It's not a good idea to put a vital piece of code in the global.asa file cause you just can't trust it to fire.

[small]"I see pretty girls everywhere I look, everywhere I look, everywhere I look. - Band song on movie "The Ringer"[/small]
<.
 
Thanks monksname.

Let me tell you what I am trying to accomplish and maybe you can assist in a work around.

It isn't that big of a deal.

I was going to use the global.asa Session_OnStart event to write some information about the client to a log database,

but that doesn't help me if it is only triggered when an asp page is loaded.

The work around might be when any page (.asp or .html) in the web site is accessed for the first time, the session begins and the information is written to the logging database.

My suggestion to myself is to put a bit of code in all of the main pages for the onload event of the <body> that would call the script to run.


 
It sounds to me like you can accomplish what you want by
putting that code to write to a log database in a SSI (server side include).

I'm not totally sure though because I don't have enough information to be sure.


[small]"I see pretty girls everywhere I look, everywhere I look, everywhere I look. - Band song on movie "The Ringer"[/small]
<.
 
sounds good, that is what I have been doing my whole asp life.

I just thought it would be nice to use another apsect of ASP.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top