473,388 Members | 1,417 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,388 software developers and data experts.

Help: Add/Remove/Clear HttpModule in subfolder never work!

Hi , I thought it's simple ,but end up come here for help(as lots of other
times). --I have several HttpModule added in the root thru web.config, but I
want to remove some and add some new ones in one of sub folder. It is not
fancy virtual folder, but simple sub folder. After create a web.config in the
subfolder,
<system.web>
<httpModules>
<clear />
</httpModules>
</system.web>

and use one of the pages in the subfolder to list
Context.ApplicationInstance.Modules collection, it always give me the full
list that I setup in the root web.config.

I don't know if this is by design in asp.net2 or something I did wrong which
is really hard to find since the scenario is so simple. I guess you may know
the answer.

Thanks a lot if you can put any comment here.
May 11 '06 #1
3 5714
<httpModules> are only configured application wide, so only in the app's
root web.config.

-Brock
http://staff.develop.com/ballen

Hi , I thought it's simple ,but end up come here for help(as lots of
other
times). --I have several HttpModule added in the root thru web.config,
but I
want to remove some and add some new ones in one of sub folder. It is
not
fancy virtual folder, but simple sub folder. After create a web.config
in the
subfolder,
<system.web>
<httpModules>
<clear />
</httpModules>
</system.web>
and use one of the pages in the subfolder to list
Context.ApplicationInstance.Modules collection, it always give me the
full list that I setup in the root web.config.

I don't know if this is by design in asp.net2 or something I did wrong
which is really hard to find since the scenario is so simple. I guess
you may know the answer.

Thanks a lot if you can put any comment here.

May 12 '06 #2
Hi Brock, so sad to hear this. Originally I tought I could use this powerful
means to handle different site features by separate each into different
folders. I guess I could still do this by developing a
ModuleCollectionMaintenance module and pluginto the BeginRequest event. ( not
sure if this work)

I do have two additional questions: 1. if HttpModule can only setup on the
app root, what's the purpose of clear and remove action, other than the
"virtual folder as separate application" case, I don't think there is any
usage at all! 2.Is there any documentation on this topic ? where do you find
this info.

Thanks a lot for the help and have a nice day.

"Brock Allen" wrote:
<httpModules> are only configured application wide, so only in the app's
root web.config.

-Brock
http://staff.develop.com/ballen

Hi , I thought it's simple ,but end up come here for help(as lots of
other
times). --I have several HttpModule added in the root thru web.config,
but I
want to remove some and add some new ones in one of sub folder. It is
not
fancy virtual folder, but simple sub folder. After create a web.config
in the
subfolder,
<system.web>
<httpModules>
<clear />
</httpModules>
</system.web>
and use one of the pages in the subfolder to list
Context.ApplicationInstance.Modules collection, it always give me the
full list that I setup in the root web.config.

I don't know if this is by design in asp.net2 or something I did wrong
which is really hard to find since the scenario is so simple. I guess
you may know the answer.

Thanks a lot if you can put any comment here.


May 12 '06 #3
> I do have two additional questions: 1. if HttpModule can only setup
on the app root, what's the purpose of clear and remove action, other
than the "virtual folder as separate application" case, I don't think
there is any usage at all!
You can have nested applications and you might want to remove or clear the
ones configured upstream.
2.Is there any documentation on this topic
? where do you find this info.


MSDN documentation, mostly:

http://msdn.microsoft.com/library/

-Brock
http://staff.develop.com/ballen
May 14 '06 #4

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

Similar topics

2
by: Dominik Amon | last post by:
Hi, I'm using HttpModules in my ASP.NET Application (Note, i'm not using HttpHandlers!). Well, it works correctly for the hole application, but i wan't to remove the httpModule for a special...
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). ...
5
by: Raj | last post by:
Hi there, I have written a small httpmodule which basically scan the incoming request on a perticular domain and pass the url based on mappings. more like a url rewriter e.g....
2
by: Bruce Groen | last post by:
I am having some authentication issues. I download a sample app to test the forms based authentication process of asp.net and it works on one of my servers but not the other one. The one that it...
0
by: kev_Eldridge | last post by:
Is there a way in asp.net 2.0 to remove programatically an HttpModule from the http pipeline when the http request is processed? For instance, if some condition is verified in the...
3
by: Brian | last post by:
My root app uses some basic url rewriting in an http module. This interferes with an application I've just installed in a subdirectory Removing the httpmodule reference from the web.config in...
0
by: Johnny J. | last post by:
I posted this last week, but didn't get any reply. I'm trying again now, because I'm getting desperate - I've tried everything I can think of myself. PLEASE help somebody. I've made an inherited...
3
by: Joseph Geretz | last post by:
I'm implementing a web application whose purpose in life is to act as a data conduit. Data is posted to my Web app in XML format, my application examines the data and forwards it onward by posting...
0
by: sksmart | last post by:
I have added httpmodule but when I am trying to remove it in subdirectory web.config of subdirectory it still get executed. Public Sub Init(ByVal context As System.Web.HttpApplication) Implements...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.