views:

119

answers:

1

I've created a object that I'd like to have accessible from wherever the request-object is accessible, and to "die" with the request, more or less like how you always in a mvc-application has access to the RouteData-collection. Especially it's important that I have access to this object in the execution of action-filters. And also there need to be created a new object of my class whenever a new request is made to the page (the object needs to be request-safe, ie. only one request modifies that one object).

Any thoughts about how to achieve this?

+2  A: 

HttpContext is a good place for this. The Items dictionary could be used to store objects relative to the request.

Darin Dimitrov