views:

16

answers:

0

Hi,

There is a SharePoint farm with aroubd 5 web apps. Each web app has numerous site collections and within each site collection there are numerous sites.

Some of the sites in each site collection will on longer be used and when any request comes to the site collection, it needs to be routed to a new SharePoint Url in a different farm.

I am trying to implement a http handler or http module to catch the requests that need to be directed and redirect to new url.

However, i need to know:

  1. Is going with Http Handler or Http Module approach the best? The client cant afford to have some custom webparts on home pages of each site collection to redirect. Therefore the request needs to be redirected before it comes to the page. Therefore i am assuming a Http Handler or Module is best way.

  2. What to choose between a Http Handler and a Http Module. I have noticed that

a> if i go with Http Module, it is executed on every request to the web application. For instance, if i just type the Url of a site collection in the browser, the Http Module gets executed around 10 times. Will this not be a performance issue?

b> if i go with a Http Handler(to handle *.aspx), handler class is invoked just once per request but once the code is getting executed, if it is found that no Url redirection is required then i am not getting any html on the page. I guess this is expected as Http Handler will be responsible to generate the response (html) and since the request is handled by the custom handler and since no code is written to generate the html, nothing is diplayed on the page.

Please let me know your thoughts.

Thanks, Faiz