
182
|
Chapter 8: ASP.NET Configuration
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
both for performance reasons and also to avoid the possibility of trace information
being viewed by site visitors. See Chapter 10 for a more detailed discussion of appli-
cation tracing. Example 8-1 shows the
<trace> element modified to enable tracing
for an application, with trace output being displayed on each page.
You can enable tracing by setting the enabled attribute to True and direct the trace
output to the page by setting the
pageOutput attribute to True. The attributes
shown in Example 8-1 override the settings in machine.config (and any parent
web.config file that contains a
<trace> element), while the remaining attributes
should retain their default values as set in machine.config.
Changing the Authentication Mode
Modifying the <authentication> element of web.config should give you a deeper
look at how configuration files work. The
<authentication> element is included in
the machine.config file with the following default settings:
<!--
authentication Attributes:
mode="[Windows|Forms|Passport|None]"
-->
<authentication mode="Windows">
<!--
forms Attributes:
name="[cookie name]" - Name of the cookie used for Forms
Authentication
loginUrl="[url]" - Url to redirect client to for Authentication
protection="[All|None|Encryption|Validation]" - Protection ...