Element
This page is specific to:.NET Framework Version:1.12.03.03.54.0
.NET Framework General Reference
<trace> Element

Configures the ASP.NET trace service.

<configuration>
   <system.web>
      <trace>

<trace enabled="true|false"
       localOnly="true|false"
       pageOutput="true|false"
       requestLimit="integer" 
       traceMode="SortByTime|sortByCategory"/>

Optional Attributes

Attribute Option Description
enabled     Specifies whether tracing is enabled for an application.
    true Indicates that tracing is enabled. Trace must be enabled in order to use the Trace.axd viewer.
    false Indicates that tracing is not enabled. The default is false.
localOnly true Indicates that the trace viewer (Trace.axd) is available only on the host Web server. The default is true.
    false Indicates that the trace viewer is available from any computer.
pageOutput     Specifies whether trace output is rendered at the end of each page.
    true Indicates that trace output is appended to each page.
    false Indicates that trace output is accessible through the trace utility only. The default is false.
requestLimit     Specifies the number of trace requests to store on the server. The default is 10. If the limit is reached, trace is automatically disabled.
traceMode SortByTime Indicates that trace information is displayed in the order it is processed. The default is SortByTime.
    SortByCategory Indicates that trace information is displayed alphabetically by user-defined category.

Example

The following example specifies tracing configuration settings.

<configuration>
   <system.web>
      <trace enabled="false" 
             pageOutput="true"
             requestLimit="15"/>
   <system.web>
</configuration>

Requirements

Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.Configuration.TraceConfigurationHandler

See Also

ASP.NET Configuration | ASP.NET Settings Schema

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View