"Hans Kesting" <news.hansdk@spamgourmet.comwrote in message
news:OStHvMFCJHA.2476@TK2MSFTNGP06.phx.gbl...
Quote:
After serious thinking Anthony Jones wrote :
Quote:
How unreliable do you think Session_End is?
>
Apparently if you use something other than InProc storage for the
session, the Session_End is never called.
>
Umm.. ok. are you using Out of Proc storage?
Is it possible to store objects that truely need to be disposed (due to
using an unmanaged resource) in an out-of-proc store?
There are three nominal ways a session ends, it times out due to being idle,
a deliberate user action or if its inproc the process is a victim of
recycling.
If it ends on idle does it really matter that objects aren't immediately
disposed?
If the process terminates naturally then the objects are dropped and any
unmanaged resources would do what they naturally do when a process ends.
If a deliberate user action then code on the server is needed to bring that
about, you could place code there to handle the disposing. Thats pretty
messy.
Like I said you really want to avoid disposable objects being stored in the
session in the first place
--
Anthony Jones - MVP ASP/ASP.NET