I am writing an ASP.NET application that initializes some contextual data based on stuff sent through the Request object. How should I be storing this so that it is only visible to objects dealing with the request?
Essentially I have an HttpModule that looks at the request, and does something based on the incoming data:
public void OnBeginRequest(object sender, EventArgs e){
if((sender as HttpApplication).Request.Url.Host == "something"){
// Store some extra information here
}
}
And then I want to retrieve the data later on in the pipeline, in a view
<%: somehowGetRequestSpecificData.MyProperty %>
How and where should I be storing that stuff?