first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

MCAD/MCSD Notes: Chapter 6, Lesson 3; Logging Exceptions

Lesson 3: Logging Exceptions

The purpose of this lesson is to introduce ASP.NET Trace functionality to record Web application exceptions.

It appears that ASP.NET tracing is an excellent alternative to a formal, generic .NET exception-handling "code block" when you need to run the ASP.NET application with reduced security privileges since writing to the Application Event Log or writing to the file system could introduce unwanted security risks.

This underscores the idea that tracing is not solely used for exception handling.

The lesson suggests that this functionality provides "standardization" for all solutions based on the .NET Framework. Since tracing features are defined in the System.Web.TraceContext class we are free to assume that this 'standard' is confined to ASP.NET applications (HTTP-dependent applications including Web services).

Application-level tracing is controlled by declaring the trace element in the Web.config file. Page-level tracing is controlled by declaring the Trace attribute in the @ Page directive.

In effect, all tracing functionality is controlled through declarative programming. In procedural code, tracing status is read-only through the Trace.IsEnabled property.

The speculation here is that Trace.axd is not a "file" but a dynamically generated resource called from a ASP.NET library.

You can allow remote viewing of Trace.axd by declaring the localOnly attribute of Trace.axd and setting it to false.

When this attribute is not declared, note that the default request limit is 10. To reset the count against the limit send this URI: "Trace.axd?clear=1".

mod date: 2005-06-12T18:51:20.000Z