Session State....The case of the missing Session scope....
Our project uses a .Net component loaded in memory, i.e. session state, to
cache user specific information. The object can be referenced from a web
page on postbacks and from the business layer when we need it.
Here's the problem....
A object in session state CANNOT obtain a reference to another session object.
There is a timeout event that occurs if the user has been inactive for 30
minutes. This event IS captured by this component, however, we need to reference
another piece of data from another object stored in Session state. We have
a shared function which returns a reference to the object, but everytime
we run the following code the result is a null reference.
Dim ctx As HttpContext = HttpContext.Current
The variable, ctx, is nothing which means we cannot obtain references to
other session objects.
Is there a way to do this?
Any creative ways around it? (No database solutions, .Net code only)
Thanks in advance.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL