Flippant Remarks about ASP.NET HTTP Context
What I notice about ASP.NET
HttpContext
:
-
The
ApplicationInstance
property has some of the events that have seemed to me to appear from nowhere inGlobal.asax.cs
—by the way,Application_Start
is not there—what is there are a bunch of authentication events (leading me quite ‘naturally’ to the subject of authentication). -
For the
Items
collection, the MSDN documentation explains that the collection “…can be used to organize and share data between anIHttpModule
interface and anIHttpHandler
interface during an HTTP request…” My opinion: this collection is meant to be used for Module programming—not for passing object-boxed data between pages (especially when these data can be accessed with thePage.PreviousPage
property). -
The
Profile
property sitting in HTTP Context helps me distinguish between Profiles and Membership—it’s the Membership processes that result in User Profile data. -
The
Cache
property refers to the second type of out-of-the-box ASP.NET caching, application data caching (output caching, by the way, is the first). Based on my current level of experience with the innards of ASP.NET I assume that theCache
property is still useful when more advanced distributed caching solutions, like Velocity, are in use.### Related Links -
“ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources”