Skip to main content
ATL Server Library Reference 
Request Handler 

A request handler is a class in a Web application DLL that implements the IRequestHandler interface. Typically, such classes derive from CRequestHandlerT and make use of the HANDLER_ENTRY macro or have the request_handler attribute applied to them.

The most important method in the IRequestHandler interface is HandleRequest, which receives IHttpServerContext and IServiceProvider pointers from the ISAPI extension DLL.

The default implementation of the IRequestHandler interface is provided by IRequestHandlerImpl and CRequestHandlerT. If a request was made for a server response file (SRF), this class parses that file, builds a response from the static content of the SRF and calls replacement methods that correspond to tags in the SRF provided by the application-specific class derived from CRequestHandlerT. If the SRF includes other SRFs or DLLs, the request handler will call in to those DLLs as well.

The request handler communicates with the ISAPI extension and ultimately the client using the interfaces provided for that purpose:

CRequestHandlerT provides request and response objects that provide a higher level abstraction on top of IHttpServerContext. The request and response objects can be accessed using the CRequestHandlerT::m_HttpRequest and CRequestHandlerT::m_HttpResponse members.

See Initializing Request Handlers for information on the points at which you can do initialization in a request handler.

See Also