This chapter tackles a number of advanced topics by digging deeper into the mechanics of how an ASP.NET page is processed. In this first section, you learn how to create a custom BuildProvider. A BuildProvider is a .NET class that generates source code from a file automatically. You learn how to create a custom BuildProvider that builds custom data access components automatically. Next, you learn how to create a custom ExpressionBuilder. An ExpressionBuilder is responsible for parsing an expression into code. For example, when you use the <%$ ConnectionStrings:MyDatabase %> syntax to refer to a connection string, you are using the ConnectionStringExpressionBuilder in the background. In this chapter, you learn how to build a custom ExpressionBuilder that looks up values from an XML file. You also learn how to work with HTTP Handlers. An HTTP Handler is a .NET class that executes whenever a request is made for a file at a certain path. For example, you can use a custom HTTP Handler to retrieve an image from a database table whenever someone requests a file with the extension .gif or .jpeg. Finally, you learn how to create custom HTTP Modules. An HTTP Module is a .NET class that executes with each and every request. For example, you can implement a custom authentication system by creating a custom HTTP Module. You also can use a custom HTTP Module to create a custom logging module. |