Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

TraceContext Class

Captures and presents execution details about a Web request. This class cannot be inherited.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public sealed class TraceContext
public final class TraceContext
public final class TraceContext

You can use this class to append messages to specific trace categories. For example, if you are creating an instance of the Calendar class for your application, you might include the trace message "Starting To Render" in a rendering procedure, and "Raising OnChange Event" in an event handler procedure.

You can also use the TraceContext class to obtain a set of trace records at the end of request execution for custom processing. For more information, see ASP.NET Tracing.

To enable tracing, set the Trace attribute in the @ Page directive or the IsEnabled property to true. When tracing is enabled, in addition to showing user-provided trace content, the Page class automatically includes performance data, control-tree structure information, and state management content for every request.

TopicLocation
Walkthrough: Using Tracing in Visual Web Developer to Help Find Web Page ErrorsBuilding ASP .NET Web Applications in Visual Studio
System.Object
  System.Web.TraceContext
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.