RE: Application_End not firing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul (Paul_at_discussions.microsoft.com)
Date: 09/20/04


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



Relevant Pages

  • Application_End not firing
    ... changing the web.config both of which are supposed to stop the web app. ... in the event and running in debug mode but the breakpoint is never hit. ... The code that I actually need to execute at application_end is to shutdown a ... the component getting shutdown it is throwing the threadabort exceptions ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is AD a good fit for an app?
    ... "Chris W" wrote in message ... users that are using a third party web app that uses ldap. ... decided to put them in a child domain so we can have rights with out the ...
    (microsoft.public.windows.server.active_directory)
  • Re: Multi threaded app database access
    ... what issues I should look for for in regards to a multi threaded app. ... A web app with DB access faces the very same issues, ... I would keep the DB access class as a stateless class, ... ICommand that just execute using the selected way ( ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ASP.net determine users domain groups
    ... Chris, ... what we did was grab an instance of the user from ... the active directory stuff, and then we basically had to recurse through the ... > groups that a user logging on to a web app with basic authentication is ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: User with privilege on a stored procedure in SQL Server 2000 / 200
    ... Permissions from All Tasks ... Then turn on Basic Auth on your web app, with Identity Impersonate = True in ... To execute that stored procedure in the client application, ...
    (microsoft.public.dotnet.framework.adonet)