By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,613 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,613 IT Pros & Developers. It's quick & easy.

Remove HttpModule for a subfolder

P: n/a
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:
<configuration>
....
<system.web>
....
<httpModules>
<add type="WsfRs.Extensions.Client.WebAuthModule, WSF_RS_ConsumerLib"
name="WsfAuthentication"/>
</httpModules>
</system.web>
<configuration>

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

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

Solution 2, using a second web.config in the subfolder:
<configuration>
<system.web>
<authorization>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthentication"/>
</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
Share this Question
Share on Google+
2 Replies


P: n/a
Try issuing a clear statement

<httpModules>
<remove name="modulename" />
<clear />
</httpModules>
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Dominik Amon" <do***************@linuxmail.org> wrote in message
news:eb*************@TK2MSFTNGP10.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:
<configuration>
...
<system.web>
...
<httpModules>
<add type="WsfRs.Extensions.Client.WebAuthModule, WSF_RS_ConsumerLib"
name="WsfAuthentication"/>
</httpModules>
</system.web>
<configuration>

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

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

Solution 2, using a second web.config in the subfolder:
<configuration>
<system.web>
<authorization>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthentication"/>
</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

P: n/a
Hi,

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

Application.AuthenticateRequest += new
EventHandler(Application_Authenticate)

That means that the ApplicationAuthenticate 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*****@despammed.com> schrieb im Newsbeitrag
news:ui*************@TK2MSFTNGP11.phx.gbl...
Try issuing a clear statement

<httpModules>
<remove name="modulename" />
<clear />
</httpModules>
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Dominik Amon" <do***************@linuxmail.org> wrote in message
news:eb*************@TK2MSFTNGP10.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:
<configuration>
...
<system.web>
...
<httpModules>
<add type="WsfRs.Extensions.Client.WebAuthModule, WSF_RS_ConsumerLib"
name="WsfAuthentication"/>
</httpModules>
</system.web>
<configuration>

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

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

Solution 2, using a second web.config in the subfolder:
<configuration>
<system.web>
<authorization>
<allow users="*"/>
</authorization>
<httpModules>
<remove name="WsfAuthentication"/>
</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 discussion thread is closed

Replies have been disabled for this discussion.