473,799 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remove HttpModule for a subfolder

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 subfolder (a WebService
Folder).

I defined the Module as followed:
<configuratio n>
....
<system.web>
....
<httpModules>
<add type="WsfRs.Ext ensions.Client. WebAuthModule, WSF_RS_Consumer Lib"
name="WsfAuthen tication"/>
</httpModules>
</system.web>
<configuratio n>

I thought that there are two ways to solve my problem:

Solution 1 using <location> tags:
<location path="Library/RechenZentrum">
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthen tication"/>
</httpModules>
</system.web>
</location>

Solution 2, using a second web.config in the subfolder:
<configuratio n>
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthen tication"/>
</httpModules>
</system.web>
</configuration>

Well finally, none of them are working (correctly), it looks like that they
are completly ignored by ASP.NET
What i'm doing wrong?

regards,
dominik

Nov 18 '05 #1
2 3769
Try issuing a clear statement

<httpModules>
<remove name="modulenam e" />
<clear />
</httpModules>
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Dominik Amon" <do************ ***@linuxmail.o rg> wrote in message
news:eb******** *****@TK2MSFTNG P10.phx.gbl...
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 subfolder (a WebService
Folder).

I defined the Module as followed:
<configuratio n>
...
<system.web>
...
<httpModules>
<add type="WsfRs.Ext ensions.Client. WebAuthModule, WSF_RS_Consumer Lib"
name="WsfAuthen tication"/>
</httpModules>
</system.web>
<configuratio n>

I thought that there are two ways to solve my problem:

Solution 1 using <location> tags:
<location path="Library/RechenZentrum">
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthen tication"/>
</httpModules>
</system.web>
</location>

Solution 2, using a second web.config in the subfolder:
<configuratio n>
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthen tication"/>
</httpModules>
</system.web>
</configuration>

Well finally, none of them are working (correctly), it looks like that they are completly ignored by ASP.NET
What i'm doing wrong?

regards,
dominik

Nov 18 '05 #2
Hi,

I did - i already found the problem, in this third party httpModule i found
the following Codeline:

Application.Aut henticateReques t += new
EventHandler(Ap plication_Authe nticate)

That means that the ApplicationAuth enticate always getting invoked, 'cuz of
this statement, even of that <remove> & <clear/> sections. Application is a
global object for all files & subdirectories

regards

--

Mit freundlichen Gruessen,

Dominik Amon
www.amon.cc
"John Timney (Microsoft MVP)" <ti*****@despam med.com> schrieb im Newsbeitrag
news:ui******** *****@TK2MSFTNG P11.phx.gbl...
Try issuing a clear statement

<httpModules>
<remove name="modulenam e" />
<clear />
</httpModules>
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Dominik Amon" <do************ ***@linuxmail.o rg> wrote in message
news:eb******** *****@TK2MSFTNG P10.phx.gbl...
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 subfolder (a WebService
Folder).

I defined the Module as followed:
<configuratio n>
...
<system.web>
...
<httpModules>
<add type="WsfRs.Ext ensions.Client. WebAuthModule, WSF_RS_Consumer Lib"
name="WsfAuthen tication"/>
</httpModules>
</system.web>
<configuratio n>

I thought that there are two ways to solve my problem:

Solution 1 using <location> tags:
<location path="Library/RechenZentrum">
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthen tication"/>
</httpModules>
</system.web>
</location>

Solution 2, using a second web.config in the subfolder:
<configuratio n>
<system.web>
<authorizatio n>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthen tication"/>
</httpModules>
</system.web>
</configuration>

Well finally, none of them are working (correctly), it looks like that

they
are completly ignored by ASP.NET
What i'm doing wrong?

regards,
dominik


Nov 18 '05 #3

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

Similar topics

4
6204
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). The Module is registered via Web.config. The registration is OK. When asking for an existing .aspx page, the eventhandler is called as it should. HOWEVER - if the request url is for a non-existant file, I get a 404 - file
4
3912
by: Danny W | last post by:
Hi There! Is it possible to use HttpModule to replace the built-in ASP.NET Session object? I want to write a HttpModule that will handle storing and retrieving of session values from an external database. For example, when a page set values to Session object such as Session("somevar")=1 then I want my HttpModule to get notified and store the value into the external database. The same for "getting" the variable, I want my own...
4
1613
by: Chip Page | last post by:
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 :
5
1413
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. http://www.abc.com/joe.block/index.html will actully be mapped to c:\root\docs\somedir\joeblocks\index.html for this HttpModule to take effect I have done the wildcard mapping on main folder but I want to allow to have classic asp pages in one of
2
2144
by: Simon-Pierre Jarry | last post by:
Hi, I created a custom HttpModule for managing the security of my application. in "Init" sub, I regsiter the events doing that : Public Sub Init(ByVal context As System.Web.HttpApplication) Implements IHttpModule.Init httpApp = context
19
10241
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However when I deploy to a remote test server running real IIS, the real root of my application becomes: http://localhost/ What I want to do is have it so that on my local machine the asp.net dev
2
4587
by: walter | last post by:
Hi there, I know there is pool of HttpApplications, and for each request coming in, HttpRuntime will dedicate one from pool to serve the request. My questions are : 1. since HttpModule is plug into the process, does each instance of HttpApplication keep its own set of HttpModule instance or HttpModules are shared among all HttpApplication instances? 2. In case of HttpApplication keep its own set of HttpModule, does the HttpModule...
3
5733
by: walter | last post by:
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>
0
1516
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 Application_BeginRequest event, is there the possibility to dinamically remove a custom HttpModule which has been added in the httpModules configuration node in the web.config ? Thanks in advance for any answer. Kev
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10238
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.