473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Problems removing an HttpModule for a sub directory.

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
Nov 19 '05 #1
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

Nov 19 '05 #2
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

Nov 19 '05 #3
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

Nov 19 '05 #4
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


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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...
1
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:...
4
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). ...
2
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...
0
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: ...
1
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...
1
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...
3
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
0
BarryA
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...
0
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...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.