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
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