Thursday, November 19, 2009

How to: Register HTTP Handlers

To register an HTTP handler for IIS 7.0 running in Integrated Mode

The following example shows how to map all HTTP requests to files with the file name extension ".SampleFileExtension" to the SampleHandler2 HTTP handler class. In this case, the handler code is in the App_Code folder, so you do not have to specify an assembly.

<configuration>
   <system.webServer>
      <handlers>
         <add name="SampleHandler" verb="*" path="SampleHandler.new" type="SampleHandler, SampleHandlerAssembly" resourceType="Unspecified" />
      </handlers>
   <system.webServer>
</configuration>

No comments: