TraceSection.MostRecent Property

 

Gets or sets a value indicating whether the most recent requests are always stored on the server.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("mostRecent", DefaultValue = false)]
public bool MostRecent { get; set; }

Property Value

Type: System.Boolean

true if the most recent requests are always stored in the trace log; otherwise, false. The default is false.

Requests are stored in the trace log in the order they arrive, up to the number of requests specified in the RequestLimit property. When the request limit is reached and MostRecent is true, older requests are automatically discarded and new requests continue to be added to the log. When the request limit is reached and MostRecent is false, new requests are discarded until earlier requests are removed from the log or the request limit is increased.

The following code example shows how to use the MostRecent property. This code example is part of a larger example provided for the TraceSection class.


// Get the current MostRecent property value.
Boolean mostRecentValue = traceSection.MostRecent;

// Set the MostRecent property to true.
traceSection.MostRecent = true;

.NET Framework
Available since 2.0
Return to top
Show: