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 4 1591
Chip,
Have you tried include the type in the <remove> tag:
Example:
<location path="test">
<system.web>
<httpModules>
<remove name="MyModule" type="HighBeam.MyModule.HighBeamLib" />
</httpModules>
</system.web>
Let me know how that works
Steve
"Chip Page" <Ch******@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com... 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
Hi everyone, I am also having the same problem.
Does the sub directory have to be an application/vroot in its own right to
add/ remove httpmodules ?
If it does it will cause me all manner of problems....
"Chip Page" wrote: 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
HttpModules are loaded and called at the vdir level (asp.net application).
To have a subdir have its own, you will to make it its own application.
you could add the filtering to to your module to support subdirs.
-- bruce (sqlwork.com)
"london calling" <lo***********@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com... Hi everyone, I am also having the same problem.
Does the sub directory have to be an application/vroot in its own right to add/ remove httpmodules ?
If it does it will cause me all manner of problems....
"Chip Page" wrote:
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
Hi Bruce, thanks for clarifying that. I have filtered in a 'brokering' module
and it works successfully , though it makes for a less pluggable architecture.
Thanks again
jd
"Bruce Barker" wrote: HttpModules are loaded and called at the vdir level (asp.net application). To have a subdir have its own, you will to make it its own application.
you could add the filtering to to your module to support subdirs.
-- bruce (sqlwork.com)
"london calling" <lo***********@discussions.microsoft.com> wrote in message news:F8**********************************@microsof t.com... Hi everyone, I am also having the same problem.
Does the sub directory have to be an application/vroot in its own right to add/ remove httpmodules ?
If it does it will cause me all manner of problems....
"Chip Page" wrote:
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bruce B |
last post by:
Hi group,
I'm experiencing some extreme weirdness over the last week with IIS related
to it's Mappings and how .NET is behaving. I can't explain the behavior as
it seems very random.
Our...
|
by: Ryan Cromwell |
last post by:
I have written an httpModule for use in our test environment. If a user goes
to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
latest version of that application deployed:...
|
by: |
last post by:
I have earlier used an HttpModule that did URL rewrites on the BeginRequest
event.
Now I am trying to use the same module in a different application on a new
and upgraded machine (winxp sp2).
...
|
by: Michael Appelmans |
last post by:
I have implemented an httpmodule class and added it in the web.config, but when
I try and use Context.RewritePath I get error:
The virtual path "/searchresult?categoryid=104" maps to another...
|
by: Ian Suttle |
last post by:
I have created an HTTPModule for error handling, which I only want to handle
a specified directory structure. In the root of my application, I have
altered the web.config file as follows:
...
|
by: Faraz |
last post by:
Hi everyone,
I am running into a slight problem. My understanding is that a custom
HttpModule will run for every request made to the server, regardless of the
extension. I do not experience this...
|
by: Max |
last post by:
I have my HTTPModule or HTTPHandler registered to process all file types
(*).
I have IIS configured to pass all requests to ASP.NET for this virtual
directory.
In some cases depending on the...
|
by: Jose Fernandez |
last post by:
HI
first of all, excuse me for my english. And Thank in advance for even read
my post.
I have a problem that is driving me insane.
I have an application (JUCAR) which use HttpModule and i have...
|
by: Bac2Day1 |
last post by:
I've got a HTTPMODULE that I need to be included on some pages within
my site, but not others. This will allow security (the purpose of the
module) on most parts of my site, but I need to bypass...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |