Httpmodules,子应用程序和清除 [英] Httpmodules, Sub-Applications and Clear

查看:49
本文介绍了Httpmodules,子应用程序和清除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个有两个子应用程序的Web应用程序。根应用程序

定义了两个不应为子应用程序加载的httpModule。我想通过添加


< httpmodules>

< clear />
$来实现这一目标b $ b< / httpmodules>

子应用程序的web.config文件中的



我的问题是编译器stil尝试加载引用的程序集

并将它们(正确地)表示为缺失。


我错过了什么?


谢谢

Markus

解决方案

< clear />从应用程序中删除HttpModule映射。


< remove name = ...>从应用程序中删除HttpModule类。


< httpModules>

< add type =" classname,assemblyname" name =" modulename" />

< remove name =" modulename" />

< clear />

< / httpModules>


Juan T. Llibre,ASP.NET MVP

ASP.NET常见问题解答: http://asp.net.do/faq/

ASPNETFAQ.COM : http://www.aspnetfaq.com/

Foros de ASP.NET en Espa?ol: http://asp.net.do/foros /

===================================== =

" Markus Kling" <毫安********** @ nospam.nospam>在消息中写道

news:uA ************** @ tk2msftngp13.phx.gbl ...


我有一个有两个子应用程序的Web应用程序。根应用程序定义了两个
httpModules,不应为子应用程序加载。我试图通过添加

< httpmodules>
< clear />
< / httpmodules>
来实现这个目标。
在子应用程序的web.config文件中。

我的问题是编译器stil尝试加载引用的程序集并声明它们(正确地)丢失。

我错过了什么?

谢谢
Markus




嗨Juan,


这正是我所做的!!


wwwroot \web.config

... 。

< httpModules>

< add type =" NK.Utils.LogInitializer,NK.Utils"名称= QUOT; LogInitializer" />

< add type =" awisto.Web.UrlRewrite.HttpModule,awisto.Web。 UrlRewrite"

name =" UrlRewrite" />

< / httpModules>

...


wwwroot\subapp\web.config

....

< httpmodules>

< clear />

< / httpmodules>

....


这导致

" wwwroot中NK.Utils dll的Pre-bin失败\subapp"应用。这是正确的,因为DLL不在

wwwroot \subapp \ bin目录中。


我的问题是它为什么不被删除! !


再次感谢,

Markus

" Juan T. Llibre" <无*********** @ nowhere.com> schrieb im Newsbeitrag

新闻:%2 *************** @ TK2MSFTNGP15.phx.gbl ...

< clear />从应用程序中删除HttpModule映射。

< remove name = ...>从应用程序中删除HttpModule类。

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

http://asp.net.do/faq/
ASPNETFAQ.COM: http://www.aspnetfaq.com/
Foros de ASP.NET en Espa?ol: http://asp.net.do/foros/
=================== ===================
Markus Kling <毫安********** @ nospam.nospam>在消息中写道
新闻:uA ************** @ tk2msftngp13.phx.gbl ...


我有一个有两个子应用程序的Web应用程序。根
应用程序定义了两个不应为子应用程序加载的httpModule。我试图通过添加

< httpmodules>
< clear />
< / httpmodules>
来实现这个目标。
在子应用程序的web.config文件中。

我的问题是编译器stil尝试加载引用的
程序集并说明它们(正确)如遗失。

我错过了什么?

Markus




不在wwwroot \ subub\web.config中:

< httpModules>

<删除name =" LogInitializer" />

< remove name =" UrlRewrite" />

< clear />

< / httpModules>


工作吗?


Juan T. Llibre,ASP.NET MVP

ASP.NET常见问题解答: http://asp.net.do/faq/

ASPNETFAQ.COM: http://www.aspnetfaq.com/

Foros de ASP.NET en Espa?ol: http://asp.net.do/foros/

============ ==========================

" Markus Kling" <毫安********** @ nospam.nospam>写在消息

新闻:OS ************** @ TK2MSFTNGP11.phx.gbl ...

嗨Juan,
wwwroot \web.config
...
< httpModules>
< ; add type =" NK.Utils.LogInitializer,NK.Utils"名称= QUOT; LogInitializer" />
< add type =" awisto.Web.UrlRewrite.HttpModule,awisto.Web。 UrlRewrite"名称= QUOT; UrlRewrite" />
< / httpModules>
..

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

这会导致NK.Utils dll中的pre-bin失败wwwroot\subapp
申请。这是正确的,因为DLL不在wwwroot \subapp \ bin目录中。

我的问题是为什么它不被删除!!

再次感谢,
Markus


" Juan T. Llibre" <无*********** @ nowhere.com> schrieb im Newsbeitrag
新闻:%2 *************** @ TK2MSFTNGP15.phx.gbl ...

< clear />从应用程序中删除HttpModule映射。

< remove name = ...>从应用程序中删除HttpModule类。

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

http://asp.net.do/faq/
ASPNETFAQ.COM: http://www.aspnetfaq.com/
Foros de ASP.NET en Espa?ol: http://asp.net.do/foros/
=================== ===================
Markus Kling <毫安********** @ nospam.nospam>在消息中写道
新闻:uA ************** @ tk2msftngp13.phx.gbl ...


我有一个有两个子应用程序的Web应用程序。根应用程序定义了两个不应为子应用程序加载的httpModule。我试图通过添加

< httpmodules>
< clear />
< / httpmodules>
来实现这个目标。
在子应用程序的web.config文件中。

我的问题是编译器stil尝试加载引用的程序集并且(正确地)将它们(正确)状态丢失。

我错过了什么?

Markus




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

解决方案

<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>


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
======================================
"Markus Kling" <ma**********@nospam.nospam> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...

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




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
"Juan T. Llibre" <no***********@nowhere.com> schrieb im Newsbeitrag
news:%2***************@TK2MSFTNGP15.phx.gbl...

<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>


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
======================================
"Markus Kling" <ma**********@nospam.nospam> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...

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




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

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

work ?

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
======================================
"Markus Kling" <ma**********@nospam.nospam> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...

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
"Juan T. Llibre" <no***********@nowhere.com> schrieb im Newsbeitrag
news:%2***************@TK2MSFTNGP15.phx.gbl...

<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>


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
======================================
"Markus Kling" <ma**********@nospam.nospam> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...

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





这篇关于Httpmodules,子应用程序和清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆