本文介绍了HttpHandler删除动词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有httphandler,这是服务器上所有.net应用程序的入口点.目标Web应用程序路径具有一些子/虚拟路径目录.

例如目标网络应用的位置为sw/entry.其他.net应用程序也部署在以下位置:sw/abc/app.

因为处理程序应用程序是根目录,所以子应用程序继承了动词(通过添加动词)并试图加载处理程序dll.我想避免位于子目录中的某些应用程序不加载处理程序dll.

我发现我需要从子应用程序中删除web.config处理程序部分中的动词.

我不知道这个语法.如果有人可以帮助我.

这是处理程序webapp中的添加动词:
<add verb="*" path="*.*" type="com.s.w.e.DomainHandler,com.s.w.e" />

我尝试在处理程序webapp以及子应用程序的web.config中直接添加删除动词.它们都不起作用.

语法如下:
<remove verb="*" path="*/sw/abc/*.aspx"/>

供:处理程序不查找任何特定的文件类型.它正在执行自定义网址重定向.

我正在使用.net 2.0 webapplication

Hi,

I have httphandler which is an entry point for all .net apps on the server. The destination webapplication path has some sub/virtual path directories.

e.g destination web app location is sw/entry. Other .net applications are also deployed in following location: sw/abc/app.

Because the handler application is root directory, the sub application are inheriting verbs (via add verb) and are trying to load the handler dll. I would like to avoid some of the applications which are located in sub directories to NOT load the handler dll.

I found out that I need to remove verb in the web.config handler section from the sub application.

I don''t know the syntax of this. If someone can help me out.

Here is the add verb in the handler webapp:
<add verb="*" path="*.*" type="com.s.w.e.DomainHandler,com.s.w.e" />

I tried adding remove verb in the handler webapp as well as sub application''s web.config directly. None of them work.

Here is the syntax:
<remove verb="*" path="*/sw/abc/*.aspx"/>

fyi: Handler is not looking for any specific file type. It is doing custom url redirecting.

I am using .net 2.0 webapplication

推荐答案

<httpHandlers>
       <remove verb="*" path="*"/>
    </httpHandlers>





this should do the trick.


<remove verb="*" path="*.asmx"/>
     <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
     <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
     <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>



您提到要使用以下语法进行删除:< remove verb ="*" path ="*"/>
如果我在此子应用程序中添加remove,它是否也将删除其他处理程序(如上所述)?



You mentioned to remove using syntax: <remove verb="*" path="*"/>
If I add remove in this sub application, wouldn''t it remove other handlers(mentioned above) as well?


这篇关于HttpHandler删除动词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 18:28