How to Add/Register Custom Handler IIS7

  •  Create your generic handler
  •  Compiled into DLL
  •  Put the DLL on your web application root ->bin folder
  •  Put your source code on app_code
  •  Register it on Web.config
<system.web.server>
<handlers>
<add name="whateveriputithere" verb="*" path="*.something" type="[namescpace.classname],[YourCompiledAssemblyName.dll]" ResourceType="Unspecified">
Note : 
ResourceType equals to iis6 verfy file exist option
"Unspecified" means unchecked
 
Share this post: | | | |
Published Tuesday, January 13, 2009 11:00 AM by cipto
Filed under:

Comments

# re: How to Add/Register Custom Handler IIS7

Tuesday, March 17, 2009 10:27 PM by Evo

Hello,

If my dll is webservice class (like this www.codeproject.com/.../wsinaclasslibrary.aspx), this class implement IHttpHandlerFactory, I register it like your post, but it not work. (IIS6 work, just IIS7 problem).

How can I do?

# re: How to Add/Register Custom Handler IIS7

Saturday, March 21, 2009 11:23 PM by cipto

Hmmm.. could you send the web.config? i can't tell.

Well the above section httphandler is for iis6, and for the below system.webserver than handlers that is  for iis7.

and what do you specify on the path?

also did you remove the default *.asmx handler which generated by asp.net? like double or something.

also did you put your dll on the bin? who know's you forget