
179
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Chapter 8ASP.NET Configuration
8
ASP.NET Configuration
When working with ASP.NET, you’ll be called on to configure your ASP.NET
applications. One major advantage that ASP.NET has over classic ASP is that
most of the important configuration options for ASP.NET applications are stored
in configuration files that reside in the web application directory. This makes it
considerably easier to deploy an application from one server to another or to repli-
cate an application across a web farm, since the application’s configuration
information will be copied along with the Web Form Pages, code-behind classes,
and assemblies that make up the application.
Understanding Configuration Files
In ASP.NET, configuration information is stored in one of two files: machine.config
or web.config. While an application can have as many web.config files as it has direc-
tories and subdirectories (subject to scope limitations of some elements), there is
only one machine.config file per machine; it contains the default configuration infor-
mation for every web application, as well as other application types, on the
machine. This information includes Windows Forms applications, security settings,
remoting settings, and other network settings. You should use extreme caution
when editing machine.config to avoid