RE: Application_End not firing
From: Paul (Paul_at_discussions.microsoft.com)
Date: 09/20/04
- Next message: Steve C. Orr [MVP, MCSD]: "Re: vb.net or c#"
- Previous message: Paul: "re:Inherit base class ?"
- In reply to: Chris Lande: "Application_End not firing"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Sep 2004 15:17:12 -0700
Hi Chris, I have run into the same thing, unfortunately still have not come
to a solution. I wanted to write some data to a file on the server and close
the file when the application ended but could the event to fire.
"Chris Lande" wrote:
> 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
- Next message: Steve C. Orr [MVP, MCSD]: "Re: vb.net or c#"
- Previous message: Paul: "re:Inherit base class ?"
- In reply to: Chris Lande: "Application_End not firing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|