G
Guest
Hello,
In my top-level Web.config, I had added a number of httpModules.
In a particular sub-directory in the application, I wish to prevent one of
the HttpModules from executing. My attempts using the <remove> element to
remove the HttpModule for a subdir have not worked.
----
My top-level Web.config contains [just the parts of interest]:
<configuration>
<system.web>
<!-- By default, everone gets the module. This part works fine. -->
<httpModules>
<add name="MyModule" type="HighBeam.MyModule, HighBeamLib"/>
<httpModules>
</system.web>
<!-- I don't want to execute MyModule for any /test files.
This part doesn't work though. -->
<location path="test">
<system.web>
<httpModules>
<remove name="MyModule"/>
</httpModules>
</system.web>
</location>
</configuration>
---
As an experiment, I put in a bogus <blah> element within the httpModules
element like so:
<location path="test">
<system.web>
<httpModules>
<blah/>
<remove name="MyModule"/>
</httpModules>
</system.web>
</location>
but this does not cause an error as I would expect. So it seems as though
the contents of the <httpModules> element is not being processed.
---
I see the same results when I remove the <location> element from the
top-level Web.config, and add a Web.config in the test sub-dir, and have the
sub-dir config remove the httpModule.
I'm using .Net Framework 1.1 (Version 1.1.4322 SP1) on Windows Server 2003.
I'm not sure if any other info would be of interest.
Any help would be greatly appreciated.
Thank you,
- Chip Page
In my top-level Web.config, I had added a number of httpModules.
In a particular sub-directory in the application, I wish to prevent one of
the HttpModules from executing. My attempts using the <remove> element to
remove the HttpModule for a subdir have not worked.
----
My top-level Web.config contains [just the parts of interest]:
<configuration>
<system.web>
<!-- By default, everone gets the module. This part works fine. -->
<httpModules>
<add name="MyModule" type="HighBeam.MyModule, HighBeamLib"/>
<httpModules>
</system.web>
<!-- I don't want to execute MyModule for any /test files.
This part doesn't work though. -->
<location path="test">
<system.web>
<httpModules>
<remove name="MyModule"/>
</httpModules>
</system.web>
</location>
</configuration>
---
As an experiment, I put in a bogus <blah> element within the httpModules
element like so:
<location path="test">
<system.web>
<httpModules>
<blah/>
<remove name="MyModule"/>
</httpModules>
</system.web>
</location>
but this does not cause an error as I would expect. So it seems as though
the contents of the <httpModules> element is not being processed.
---
I see the same results when I remove the <location> element from the
top-level Web.config, and add a Web.config in the test sub-dir, and have the
sub-dir config remove the httpModule.
I'm using .Net Framework 1.1 (Version 1.1.4322 SP1) on Windows Server 2003.
I'm not sure if any other info would be of interest.
Any help would be greatly appreciated.
Thank you,
- Chip Page