asp.net – 如何确定HttpModules的执行顺序?
发布时间:2020-05-23 07:41:20 所属栏目:asp.Net 来源:互联网
导读:假设FirstModule和SecondModule都处理Application_BeginRequest事件。它将按照web.config中定义的顺序执行吗? httpModules add type=MyApp.FirstModule, MyApp name=FirstModule/ add type=MyApp.SecondModule, MyApp name=
|
假设FirstModule和SecondModule都处理Application_BeginRequest事件。它将按照web.config中定义的顺序执行吗? <httpModules> <add type="MyApp.FirstModule,MyApp" name="FirstModule"/> <add type="MyApp.SecondModule,MyApp" name="SecondModule"/> <add type="OtherApp.OtherModule,OtherApp" name="OtherModule"/> </httpModules> 有没有其他方法可以指定订单? 解决方法根据 this forum post,HttpModules按照它们被注册的顺序执行。这对我有意义,因为否则的话< clear>和< remove>指令也不会按预期工作,例如。当使用这样:<httpModules> <clear/> <add... /> </httpModules> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- asp.net-mvc – asp.net mvc formcollection
- asp.net – 使用Ajax,在服务器或客户端生成额外的
- asp.net-mvc – 使用Entity FrameWork保存更改/更
- asp.net – app_offline.htm在生产框中抛出HTTP
- ASP.Net下载大文件的实现方法
- asp.net – 什么时候不应该使用Web服务?
- asp-classic – 如何在经典ASP中遍历集合?
- .net – 数据绑定到LINQ到实体时的重复行
- asp.net-mvc – 所有ASP.NET Web API控制器返回4
- asp.net-mvc – 在自定义Html帮助器中访问模型对
热点阅读
