need to collect event information at end of application

G

Guest

I have setup event collections throughout a web application that uses the session state to save ex.message information into an array of strings. I want to copy the session state information into an array and then write it to a file when the application ends. I inserted a breakpoint in the global.aspx.vb file
Sub Application_End but it does not hit the breakpoint when I close the web window (currently just closing the application by clicking on the x block in the right corner of the window). Looks like it is not getting to this subroutine, just wondering if anyone had any suggestions?
Thanks
 
M

Mark Fitzpatrick

Paul,
Closing the browser will not cause the Application_End event to
fire. The web server knows nothing about the browser being closed because
the only time the browser and web server are in communication are when the
browser is requesting something from the web server. The Application_End
event is fired after the last session expires. Usually, a session is killed
after 20 minutes of inactivity. You could set the session timeout to a much
lower number to assist in debugging and force the session to end earlier
than in a production environment, hopefully also causing the application_end
event to be fired.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

Paul said:
I have setup event collections throughout a web application that uses the
session state to save ex.message information into an array of strings. I
want to copy the session state information into an array and then write it
to a file when the application ends. I inserted a breakpoint in the
global.aspx.vb file
Sub Application_End but it does not hit the breakpoint when I close the
web window (currently just closing the application by clicking on the x
block in the right corner of the window). Looks like it is not getting to
this subroutine, just wondering if anyone had any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top