Flippant Remarks about ASP.NET HTTP Context
What I notice about ASP.NET HttpContext:
-
The
ApplicationInstanceproperty has some of the events that have seemed to me to appear from nowhere inGlobal.asax.cs—by the way,Application_Startis not there—what is there are a bunch of authentication events (leading me quite ‘naturally’ to the subject of authentication). -
For the
Itemscollection, the MSDN documentation explains that the collection “…can be used to organize and share data between anIHttpModuleinterface and anIHttpHandlerinterface 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.PreviousPageproperty). -
The
Profileproperty sitting in HTTP Context helps me distinguish between Profiles and Membership—it’s the Membership processes that result in User Profile data. -
The
Cacheproperty 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 theCacheproperty 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”