none
HttpHandler in SharePoint.

    Question

  • Hi All,

    I have used the HttpHandler in Asp.Net applications. I am just curious that is there any scenario where I might have to write the custom httphandler in SharePoint too? Have anyone created custom HttpHandler in their professional course in SharePoint? If yes, could you please share the functionality for which you have created the custom HttpHandler?

    Thanks for help.

    Regards Amit K

    Saturday, April 28, 2012 7:00 PM

Answers

  • Hello Amit,

    I remember implementing HTTPHandlers and HTTPModules in the following two scenarios in the SharePoint platform.

    a) When we migrated the enterprise intranet applications of our customer from SPS2003 & MCMS 2002 to MOSS 2007, one of the major changes was in the URL of the pages. In MCMS the extension was .html where as in MOSS it changed to .aspx and due to the areas concept of SPS2003 there were some more changes in the URL of the pages. From our customer's point of view this was a show stopper as the bookmarked links to some very important articles would become invalid after migration which we had to work around.

    b) To use custom error pages than the Out of the box SharePoint error pages

    c) Suppose you have a publishing site which is internet facing and you expect a huge amount of traffic. You can then use HTTPHandler to generate HTML response instead of aspx to make the pages load faster.

    In summary : you use httpmodule can be used for customizing authentication, redirection etc as your code is executed every time a HTTP request is received at iis.
    Httphander can be used as an endpoint to implement something specific like generating custom XML / text / html response etc.

    In SharePoint 2010 too you could use the above for the very same purposes. You can search more on the internet for some more sample scenarios. However here are a few more...

    http://blogs.msdn.com/b/kaevans/archive/2010/08/04/deploying-an-asp-net-httphandler-to-sharepoint-2010.aspx

    http://blogs.msdn.com/b/pranab/archive/2007/12/13/using-http-module-for-sharepoint-2007-moss-wss-site-using-fba-and-rsa.aspx

    http://www.sharepointkings.com/2009/06/changing-redirection-in-sharepoint-with.html

    Hope this helps...


    -Sangeetha

    Sunday, April 29, 2012 5:57 AM

All replies

  • You may need to create one for captcha check the link below

    http://nanddeepnachan.blogspot.com/2008/06/captcha-for-sharepoint-blog.html

    If the reply was helpful or informative, please remember to mark it as answer or vote as helpful. MCITP SHAREPOINT

    Saturday, April 28, 2012 8:20 PM
  • First of all thanks for your reply. I do appreciate your efforts.

    I have gone through the link that you have provided. You have used the HttpHandler to generate the image. This is just a plain asp.net development. It has nothing to do with SharePoint.

    Have anyone developed any SharePoint specific feature using Http Handler. If yes please share with me.

    Saturday, April 28, 2012 9:38 PM
  • Well its the same anything you may need for a normal web application what do you mean by sharepoint specific feeature ?

    Some time you need acptcha for sharepoint and the link explain how to deploy it to sharpoint


    If the reply was helpful or informative, please remember to mark it as answer or vote as helpful. MCITP SHAREPOINT

    Saturday, April 28, 2012 9:41 PM
  • Hello Amit,

    I remember implementing HTTPHandlers and HTTPModules in the following two scenarios in the SharePoint platform.

    a) When we migrated the enterprise intranet applications of our customer from SPS2003 & MCMS 2002 to MOSS 2007, one of the major changes was in the URL of the pages. In MCMS the extension was .html where as in MOSS it changed to .aspx and due to the areas concept of SPS2003 there were some more changes in the URL of the pages. From our customer's point of view this was a show stopper as the bookmarked links to some very important articles would become invalid after migration which we had to work around.

    b) To use custom error pages than the Out of the box SharePoint error pages

    c) Suppose you have a publishing site which is internet facing and you expect a huge amount of traffic. You can then use HTTPHandler to generate HTML response instead of aspx to make the pages load faster.

    In summary : you use httpmodule can be used for customizing authentication, redirection etc as your code is executed every time a HTTP request is received at iis.
    Httphander can be used as an endpoint to implement something specific like generating custom XML / text / html response etc.

    In SharePoint 2010 too you could use the above for the very same purposes. You can search more on the internet for some more sample scenarios. However here are a few more...

    http://blogs.msdn.com/b/kaevans/archive/2010/08/04/deploying-an-asp-net-httphandler-to-sharepoint-2010.aspx

    http://blogs.msdn.com/b/pranab/archive/2007/12/13/using-http-module-for-sharepoint-2007-moss-wss-site-using-fba-and-rsa.aspx

    http://www.sharepointkings.com/2009/06/changing-redirection-in-sharepoint-with.html

    Hope this helps...


    -Sangeetha

    Sunday, April 29, 2012 5:57 AM
  • Thanks Sangeetha.
    Sunday, April 29, 2012 7:42 AM