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.
After lots more research I’ve come to the conclusion that no you can’t, instead I check the path in the Handler itself.