SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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