see here
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DO
T_NET/Q_21066016.html
it asks the same question, and a response from daffodils.
In short, recycle of aspnet_wp.exe does not result in triggering of
Application_End(). by design.
> 1. How can we get a handle to the recycle event so that the "a.exe"
> process
> can be killed and its memory released during recycle? We tried
> Application_End and Session_End events but they were not fired during the
> recycle.
I don't know this.
> 2. How can we ensure that the memory does not reach the upper limit
> through
> forced garbage collection?
Manually performing GC is not going to solve your problems. trust me, the
.NET runtime will be in a better position to decide when and how often to GC
than your app. You shouldn't be tweaking with this, unless absolutely
positively required, and even then, you had better make sure you know what
you are doing.
The symptom you describe (Aspnet_wp.exe recycle) is caused by memory
growth, or a non-responsive or runaway process. IF this is what you have,
then it sounds like an application bug. Find and fix the bug to remove the
anomalous behavior.
Also, I think you need to re-visit your app design, to figure out when and
how to attach to a.exe . Why are you doing a Process.Start()? This seems
hacky.
-Dino
> Hi,
> We have a webservice in c# which makes use of XML and COM objects. The
[quoted text clipped - 19 lines]
> Thanks for your help.
> Regards.