Initializing Request Handlers
To have initialization code executed before the request and response objects have been initialized
Add code to the constructor of your request handler.
Use the constructor for initialization that cannot fail because there is no supported way of returning an error from the constructor of a request handler.
To have initialization code executed before the request object has been initialized and after the response object has been initialized
Override CRequestHandlerT::CheckValidRequest in your request handler.
You can use the server context and response object, but do not use the request object. If the initialization code that you add to CheckValidRequest fails, you can return an HTTP status code.
To have initialization code executed after the request and response objects have been initialized
To uninitialize your request handler
Override CRequestHandlerT::Uninitialize in your request handler and add your code there.
Add code to your request handler's destructor.