Application_End not firing

G

Guest

I have some code I need executed when the application shuts down so I placed
it in the global.asax in the Application_End event but it appears to never
get executed. I have tried doing an iisreset from the command line and
changing the web.config both of which are supposed to stop the web app. The
way I have checked to see if the event is fired is by setting a break point
in the event and running in debug mode but the breakpoint is never hit. I
have also tried adding code to write to both the file system and the event
log and running the app in release mode from outside of the IDE but none of
those actions get performed.

The code that I actually need to execute at application_end is to shutdown a
component that has extra threads running. What I'm seeing is that instead of
the component getting shutdown it is throwing the threadabort exceptions
generated by it's threads when the web app actually gets shutdown by
something like a change to the web.config. The component itself shuts down
it's threads flawlessly and w/o error when running it from a desktop app. It
also shuts down flawlessly when instructed to do so from other parts of the
web app. So all this makes me think that the code to shut it down that I have
in the application_end is simply not being executed.

Win2k Server (standard I think) SP4
both 1.1.4322 and 1.0.3705 of the framework installed (this app uses 1.1 but
was converted from 1.0)

thanks,
Chris
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top