
422
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Chapter 20web.config Reference
20
web.config Reference
ASP.NET provides a completely new model for configuring web applications.
This greatly simplified process makes it considerably easier to deploy application
configuration settings, the application’s content, and its components. Central to
this new configuration model is web.config, an XML-based file that contains the
configuration settings for your application. Because the file is written in XML, it is
both human- and machine-readable.
web.config files configure applications hierarchically—i.e., an application can
contain more than one web.config file, with each file residing in a separate folder
of the application. Settings in a web.config file in a child folder of the application
root override the settings of the web.config file in the parent folder. Settings not
defined in the child web.config file inherit the settings from the parent web.config
file. Figure 20-1 demonstrates these rules of precedence.
Figure 20-1. Inheriting and overriding web.config settings
\Chapter20
\Sub1
<configuration>
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>
<configuration>
<system.web>
<pages enableSessionState="false"/>
</system.web>
</configuration>
Denies access to anonymous users for
Chapter20 and ...