K
Karch
I have an assembly which contains 2 HttpModule class that inherit from a
base class. The base class simply provides some common methods - nothing
special. The strange thing is that, even though I only specify one or the
other modules in the httpModules section, it seems that both constructors
are called. What is going on here? How do I force it to only load the
HttpModule that is indicated like so:
If I want MyModule1 to be the "active" module, I specify this in the
web.config:
<httpModules>
<add type="MyAssembly.MyModule1, MyAssembly" name="MyModule1" />
</httpModules>
If I want MyModule2 to be the "active" module, I specify this in the
web.config:
<httpModules>
<add type="MyAssembly.MyModule2, MyAssembly" name="MyModule2" />
</httpModules>
What am I doing wrong? I keep getting runtime errors from the MyModule1
constructor when I have specified the MyModule2 module (the contructor for
MyModule2 executes as well, by the way). I am using .NET 2.0 Framework.
Thanks,
K
base class. The base class simply provides some common methods - nothing
special. The strange thing is that, even though I only specify one or the
other modules in the httpModules section, it seems that both constructors
are called. What is going on here? How do I force it to only load the
HttpModule that is indicated like so:
If I want MyModule1 to be the "active" module, I specify this in the
web.config:
<httpModules>
<add type="MyAssembly.MyModule1, MyAssembly" name="MyModule1" />
</httpModules>
If I want MyModule2 to be the "active" module, I specify this in the
web.config:
<httpModules>
<add type="MyAssembly.MyModule2, MyAssembly" name="MyModule2" />
</httpModules>
What am I doing wrong? I keep getting runtime errors from the MyModule1
constructor when I have specified the MyModule2 module (the contructor for
MyModule2 executes as well, by the way). I am using .NET 2.0 Framework.
Thanks,
K