TraceContextRecord Class
Represents an ASP.NET trace message and any associated data.
Assembly: System.Web (in System.Web.dll)
The TraceContextRecord object encapsulates the trace message, category, any associated Exception, and whether the trace record was written by the TraceContext::Warn method.
Every call to the TraceContext::Write and TraceContext::Warn methods generates a TraceContextRecord object that is added to the TraceContextEventArgs::TraceRecords messages collection. You can access the collection of records by handling the TraceFinished event.
The following code example demonstrates how you can register a TraceContextEventHandler delegate to handle the TraceFinished event. In this example, the OnTraceFinished method accesses the collection of TraceContextRecord objects through the TraceRecords property, iterates through them, and writes them to the response stream.
- SecurityPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.