Httpmodules, Sub-Applications and Clear

M

Markus Kling

Hi,

I have a web application that has two sub-applications. The root application
defines two httpModules which shall not be loaded for the subapplications. I
tried to achieve this by adding

<httpmodules>
<clear />
</httpmodules>

within the web.config file of the sub-applications.

My problem is that the compiler stil tries to load the referenced assemblies
and states them (correctly) as missing.

What did I miss?

Thanks
Markus
 
J

Juan T. Llibre

<clear /> removes HttpModule mappings from an application.

<remove name=...> removes the HttpModule class from an application.

<httpModules>
<add type="classname,assemblyname" name="modulename"/>
<remove name="modulename"/>
<clear/>
</httpModules>
 
M

Markus Kling

Hi Juan,

that's exactly what I did!!

wwwroot\web.config
....
<httpModules>
<add type="NK.Utils.LogInitializer,NK.Utils" name="LogInitializer" />
<add type="awisto.Web.UrlRewrite.HttpModule,awisto.Web.UrlRewrite"
name="UrlRewrite" />
</httpModules>
...

wwwroot\subapp\web.config
....
<httpmodules>
<clear />
</httpmodules>
....

This results in a Pre-bin failure for the NK.Utils dll within the
"wwwroot\subapp" application. That's correct since the DLL is not in the
wwwroot\subapp\bin directory.

My question was why it is not removed!!

Thanks again,
Markus
 
J

Juan T. Llibre

Doesn't, in wwwroot\subapp\web.config :

<httpModules>
<remove name="LogInitializer"/>
<remove name="UrlRewrite"/>
<clear />
</httpModules>

work ?
 
J

Juan T. Llibre

Hi, Mark.

OK, from your post it wasn't clear whether you were removing
the modules by using <remove name="LogInitializer"/> and
<remove name="UrlRewrite"/> since you only included <clear />
in your reply.

If that's the case, I'd bug it at the Feedback Center :

http://lab.msdn.microsoft.com/productfeedback/

You'll need a Passport account to be able to file bug reports there.
 
M

Markus Kling

Just to be clear. The issues are for .Net 1.2. Haven't crosschecked with
..Net 2.0 runtime.

Markus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top