I have written an ASP.NET HttpModule and I have a static helper class that is used to load and store configuration data for the life of the request.
Since static constructors must be parameterless, I have a static SetConfigName method that I call at the start of the processing of the HttpRequest.
public static void SetConfigName (string configName)
{
// load data specific to given configName
}
There are also static Get() methods that are called later during processing of the HttpRequest.
The configuration data that is loaded can be different for each request (based on values in the URL), so I do not want other requests to share the static data once I have called SetConfigName.
So the question is, do multiple requests share the same static data, or does each new request get a separate copy of the static class? (And if data is shared, how to avoid it? Is the only alternative to make it a non-static class?)
(By the way, I do not use global.asax.)