IIS7.5模块配置
是否可以配置 IIS,以便仅将模块添加到特定路径的管道中?我所说的路径是指文件夹及其中的任何内容,所以如果我有以下布局:
ROOT
ROOT/a.aspx
ROOT/b.aspx
ROOT/SUB1/
ROOT/SUB1/c.aspx
ROOT/SUB1/d.aspx
我想为任何对 ROOT/SUB1/ 的请求启用模块(即 ROOT/SUB1/c.aspx、ROOT/SUB1/d.aspx )而不是 ROOT/ 、 ROOT/a.aspx 等。
我尝试过该元素,并且尝试将单独的 web.config 文件放入子文件夹中。这些方法确实适用于处理程序,但不适用于模块;该模块针对每个请求执行。
我正在使用 ASP.NET、IIS 7.5、.net 4.0、集成。
Is it possible to configure IIS so that a Module is only added to the pipeline for a specific path? By path I mean folder and anything therein, so if I've got the following layout:
ROOT
ROOT/a.aspx
ROOT/b.aspx
ROOT/SUB1/
ROOT/SUB1/c.aspx
ROOT/SUB1/d.aspx
I want to enable the Module for any request to ROOT/SUB1/ (ie ROOT/SUB1/c.aspx, ROOT/SUB1/d.aspx) and not ROOT/ , ROOT/a.aspx etc.
I've tried the element, and I've tried putting a seperate web.config file in a sub folder. These approaches do work for Handlers, but not for a Module; the Module gets executed for every request.
I'm using ASP.NET, IIS 7.5, .net 4.0, Integrated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过大量研究后,我得出的结论是,不,你不能,而是检查处理程序本身的路径。
After lots more research I've come to the conclusion that no you can't, instead I check the path in the Handler itself.