I have an HttpHandler configured in my web.config file like so:
<add verb="GET,HEAD,POST"
path="TinyMCE.ashx"
type="Moxiecode.TinyMCE.Web.HttpHandler,Moxiecode.TinyMCE" />
When I deploy to IIS 7 the handler stops working (404).
What do I need to do to get this working?
HTTP modules and HTTP handlers are an integral part of the ASP.NET architecture. While a request is being processed, each request is processed by multiple HTTP modules (for example, the authentication module and the session module) and is then processed by a single HTTP handler.
In the application's Web. config file, create an httpHandlers section. Create a system. webServer section inside the configuration element.
To create a custom HTTP handler, you create a class that implements the IHttpHandler interface to create a synchronous handler. Alternatively, you can implement IHttpAsyncHandler to create an asynchronous handler. Both handler interfaces require that you implement the IsReusable property and the ProcessRequest method.
HTTPHandler is a low level request and response API in ASP.Net for injecting pre-processing logic to the pipeline based on file extensions and verbs. An HTTPhandler may be defined as an end point that is executed in response to a request and is used to handle specific requests based on extensions.
Registration of HttpHandlers is different for IIS7 than for previous versions of IIS. Specifically, you register the handlers in the web.config section named <system.webServer><handlers>
not in <httpHandlers>
.
See this question for an example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With