Tuesday, September 2, 2008

Application-level Trace Logging

In addition to the Page-level Trace funtionality, ASP.NET provides a way to enable trace output for an entire application. Enabling Trace at the application level has the effect of enabling Page-level Trace for every page within that application (provided there is no page-level directive to explicitly disable trace). When application-level tracing is enabled, the ASP.NET runtime also collects several additional statistics, such as the state of the control hierarchy, the contents of session and application state, the form and querystring input values, and other characteristics of request's execution. These statistics are collected for a specified number of requests as determined by the application's configuration file. To enable tracing for an application, place the following in the application's web.config file at the application root directory:

trace enabled="true"

Using the above configuration, each page in the application will run its page-level trace statements to be output in the client browser. To access the additional page statistics, request a specially-mapped "trace.axd" URL from the application root. For example, if the URL to your application is http://localhost/myapplication, you would request the URL http://localhost/myapplication/trace.axd to access the trace statistics for that application.

More...
http://quickstart.developerfusion.co.uk/QuickStart/aspnet/doc/monitoring/apptrace.aspx

ASP.Net Feeds