10.2. Uncovering Problems Application Wide
You want to find the sources of problems at any point in an application, but you don’t want to have to change every page to do so, nor do you want to disrupt the output of your application pages.
Enable application-level tracing in the application
web.config file and then view the AXD
application trace log for your application.
web.configfile in the root directory of your application (or create one if it does not already exist).
Enable application-level tracing by adding a
<trace>element to the
web.configand setting its
enabledattribute to "
<trace enabled="true" /></system.web> </configuration>
View the application trace log by browsing to the
trace.axdpage from the application root, like this:
http://localhost/<your application name>/trace.axd
Figure 10-2 shows some sample trace log output.
Figure 10-2. Application-level tracing output (trace.axd)
By adding a
enabled attribute to
true“, you can activate application-level
<trace enabled="true" />
What then happens is that ASP.NET collects trace information for each
HTTP request to the application and directs it to the application
trace log. You can view the application trace log in the
trace viewer. To view the trace viewer,