I wrote an ASP.NET HttpModule, and I have a static helper class that is used to load and store configuration data for the lifetime of the request.
Since static constructors should be parameterless, I have a static SetConfigName method that I call at the beginning of HttpRequest processing.
public static void SetConfigName (string configName)
{
}
There are also static Get () methods that are called later during HttpRequest processing.
The loaded configuration data may differ for each request (based on the values in the URL), so I do not want other requests to share static data after calling SetConfigName.
So the question is, do multiple queries use the same static data, or does each new request receive a separate copy of the static class? (And if the data is separated, how to avoid it? The only alternative to make it a non-stationary class?)
(By the way, I do not use global.asax.)
source
share