Where should i put my custom HTTP Module that Implement “IHttpModule” interface to SharePoint 2010 and make it functional?

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/16291

  •  16-10-2019
  •  | 
  •  

문제

I create my httpmodule base on this article Global Exception Handling in SharePoint but he didn't said how can i use this in sharepoint 2010 and where should i put this and make it functional.
as far as i know, i must put the "add" tag in "module" or "httpmodule" section into web.config file and add the dll file into GAC or "bin" folder to make it work, am i right?

도움이 되었습니까?

해결책

Indeed, that should be all you need to do to get the module to work.

I would wrap this up though in a solution that deploys the DLL to the GAC, and a Farm-scoped Feature with Receiver Code that injects the required lines into web.config using SPWebConfigModification.

You could do it manually, but if you have multiple web front ends, this method will ensure the are all synchronised and have the exact same changes made to all of them.

Plus, uninstallation is easier (you just need deactivation code to remove the lines from webconfig, again using SPWebConfigModification). And when you retract the solution, it'll remove the DLL from the GAC for you. Again, all of this is synchronised across all your web front ends.

다른 팁

You may want to consider an alternative to the blog poist your referenced that does not require a custom HTTP module. SharePoint 2010 allows you to register your own custom error page without the need for a custom HTTP module.

http://todd-carter.com/post/2010/04/07/An-Expected-Error-Has-Occurred.aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top