Im sure there was a request-wide object
-based storage medium, similar to HttpContext.Current.Session
, that persisted globally just for the life of a single request, but I cannot for the life of me remember it.
Storage medium for the lifecycle of a single request?
1.8k Views Asked by maxp At
3
There are 3 best solutions below
0

There's TempData in ASP.Net MVC. Items persisted there survive only from one request to the next. Ultimately, its storage is session state.
I bet you're thinking of HttpContext.Items.
Very useful for sharing state between HttpModules, HttpHandlers and pages from different parts of the request cycle.
More reading:
Note that HttpContext.Items works for both ASP.NET WebForms and ASP.NET MVC but it there's a caveat when using both in the same web app. More about that in this question.