Is there anyway to deploy an HttpModule using a site-level feature (WSP) and for it to be active for that specific site collection only?

1 Answer 1


No. An HttpModule is added to the HTTP pipeline for requests/responses for a particular web application, so it's a broader scope.

You could have a dedicated web application for a single site collection. Or you could check within the HttpModule that the site collection is one you want to process (I would consider storing some sort of flag in the SPSite.RootWeb's properties. Obviously, checking those for each request could have a detrimental impact on performance).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.