Depends how you stored them in Application State. There is nothing to stop
you from creating a little "container" class that has an object field to hold
your "thing" and a DateTime field to hold the time you stored it.
Peter

Signature
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
Hi Lucius,
For your scenario, you want to store some shared objects in the global
Application State collecction and make it be cleared after a certain
period. I think you'd better consider using the Application Cache instead
of ApplicaitonState. The Application Cache is also a global storage of
ASP.NET application and you can store and access items into it like a
dictionary. Also, you can supply a CacheDependency for each cache item so
as to control how will the cached item expired(be removed from cache
collection). e.g.
//cache and object and supply the lifetime(to expire)
Cache.Insert("item key", objectToCache, null, DateTime.MaxValue,
TimeSpan.FromSeconds(10));
#Cache.Insert Method (String, Object, CacheDependency, DateTime, TimeSpan)
http://msdn2.microsoft.com/en-us/library/4y13wyk9.aspx
Actually, the ApplicationState is provided for backward compatibility to
original classic ASP. You can use Application Cache to replace
ApplicationState in ASP.NET application.
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 28 Jun 2007 16:26 GMT
Hi Lucius,
Does the cache approach mentioned in last reply address the problem? If you
have any further questions, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.