jes*_*vin 34 asp.net web-config httpmodule
假设双方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>
Run Code Online (Sandbox Code Playgroud)
是否有其他方式可以指定订单?
M4N*_*M4N 35
根据这篇论坛帖子,HttpModules按照注册顺序执行.这对我来说很有意义,因为否则<clear>和<remove> 指令也不会按预期工作,例如当这样使用时:
<httpModules>
<clear/>
<add... />
</httpModules>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8519 次 |
| 最近记录: |