Question

Very simple question, but nonetheless confusing. According to the Microsoft documentation, it is necessary to register a HttpHandler (used to serve images dynamically from DB) in the <handlers> section of the Web.Config file:

How to: Register HTTP Handlers

This was also specified in a previous answer on this topic:

HttpHandler not Working in IIS 7

The confusion stems from the fact that I currently have it working in an ASP.NET Web Forms project without any entry in the config file. Can someone shed some light on this and if it may effect the performance of the handler for this particular task?

public class ImageHandler : IHttpHandler
{
    ....
}
Was it helpful?

Solution

It wasn't entirely clear in your question, but in the comments we have established that you are asking why a handler that's exposed via an ASP.NET .ashx file does not need to be mapped. The answer is simple: when ASP.NET is installed it adds a global handler to IIS7 for the *.ashx extension with the name SimplerHandlerFactory-Integrated and SimpleHandlerFactory-Integrated-4.0. This handler simply acts like a wrapper and executes the underlying IHttpHandler implementation that is pointed to by the ASHX.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top