Chapter 18. Application Logic and Configuration
The original versions of ASP.NET offered many improvements over classic ASP in the areas of controlling, configuring , and deploying web applications. ASP.NET 2.0 builds on this infrastructure. This chapter and the next will cover all of these issues.
ASP.NET provides easy access to application-wide program logic through the global.asax file. This text file allows you to create event handlers for many events exposed by the application as a whole and by individual sessions. You can also include variables and methods that will apply globally to the entire application.
Configuration of web applications is handled using the XML configuration files machine.config and web.config, which provide a flexible and hierarchical configuration scheme. Configuration settings can apply to every application on the web server, to specific applications, or to specific subdirectories within an application. Two tools new to ASP.NET 2.0, the ASP.NET Configuration Settings dialog box and the Web Site Administration Tool, are provided as a welcome alternative to hand-editing application-specific configuration files.
Since all of the configuration and control for ASP.NET applications is done with text files, either XML or some other variant of plain text, you can maintain and update a web application remotely. You don’t need to be physically present at a web server to reconfigure the application through IIS (though access to these files is tightly controlled so ...
Get Programming ASP.NET, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.