ASP.NET application stopping event?
Posted
by Barguast
on Stack Overflow
See other posts from Stack Overflow
or by Barguast
Published on 2010-03-22T11:28:17Z
Indexed on
2010/03/22
11:31 UTC
Read the original article
Hit count: 274
I have a ASP.NET application which implements a custom in-memory cache. I'm using this as opposed to ASP.NET's caching mechanism as I needed a more complex way to handle what to drop from the cache. Part of this custom cache is a separate thread which occasionally searches for data to drop from the cache whenever it gets too large.
What I need to do is signal this cache maintenance thread to stop whenever the ASP.NET application 'exits'. I guess this basically amounts to when the web site is stopped in IIS.
Is there a pre-existing event I can utilise to do this? Thanks.
© Stack Overflow or respective owner