Click to See Complete Forum and Search --> : Global.asa Application_OnEnd problem


jux82
12-23-2002, 10:24 PM
Hi,

I have a asp application that suppose to reset some records in the database once the user close the browser..
I tried using Global.asa and put the codes to reset records under the Application_OnEnd event..
It doesn't seem to work
I also did the same in the Session_OnEnd event
However, it works well in the case of Sessio_OnEnd
Also I want the global.asa to redirect the user once it finishes the sql execution..
Any clue of the problem?

vickers_bits
12-23-2002, 11:51 PM
the Application_OnEnd procedure only runs when the application finishes (usually when the server goes down). it won't run when a user closes their browser, that would only cause the session to finish, hence the Session_OnEnd procedure works.

you might have a little trouble redirecting the user when the session finishes because the browser may be closed, or the session may have to timeout to run the procedure, if the user just decided to visit another site.

hope i helped