
424
|
Chapter 20: web.config Reference
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Comments/Troubleshooting
Probably the most common error that is encountered with web.config and
machine.config relates to capitalization. Tags and elements within both these files
are case-sensitive. Tags and elements follow the naming convention referred to as
camel-casing, in which the first letter of the first word of the element or attribute
is lowercase, and the first letter of each subsequent word is uppercase. Attribute
values are also case-sensitive, but do not follow any particular naming convention.
While the ability of applications and folders to inherit settings from parent web.config
files is very convenient, it presents security implications. For example, the
<appSettings> element can be used to store key/value pairs for runtime retrieval from
your application. If this element is used to store values in the machine.config file,
these values are available to any application on that machine. In a shared server envi-
ronment, this could potentially expose information to others in undesirable ways.
Another security issue with both machine.config and web.config is how to prevent
modification of inherited settings. For example, a server administrator might want
to configure authentication settings globally in the machine.config file and