Previous Page
Next Page

Conclusion

ASP.NET includes a number of built-in classes to handle most kinds of requests. For example, ASP.NET includes UI handlers (System.Web.UI.Page and System.Web.UI.Control). ASP.NET also includes a Web service handler (System.Web.Services.Service). These classes will probably solve most of the requirements you might come across. However, for those fringe cases requiring custom handling, ASP.NET supports the custom handler.

The endpoint for requests coming through ASP.NET is always a class implementing IHttpHandler. IHttpHandler has very little surface area. You simply override the IsReusable property and the ProcessRequest method. ProcessRequest can pretty much do anything you want it to. The example in this book included a handler that manages rendering a form and handling input.

For a custom handler assembly to work, it must be mapped to a file path or extension in the application's Web.Config file. The extension must also be mapped within the IIS metabase.

ASP.NET also supports handlers that may be compiled just-in-time. Simple handlers are easy to create and deploy because you don't need to modify the Web.Config file, nor do you need to modify the IIS metabase.


Previous Page
Next Page