Edit

Share via


TraceSection.RequestLimit Property

Definition

Gets or sets a value indicating the maximum number of requests to the application for which ASP.NET stores trace information.

public:
 property int RequestLimit { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("requestLimit", DefaultValue=10)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int RequestLimit { get; set; }
[<System.Configuration.ConfigurationProperty("requestLimit", DefaultValue=10)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.RequestLimit : int with get, set
Public Property RequestLimit As Integer

Property Value

The maximum number of requests to store on the server. The default is 10.

Attributes

Examples

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


// Get the current RequestLimit property value.
Int32 requestLimitValue = traceSection.RequestLimit;

// Set the RequestLimit property to 256.
traceSection.RequestLimit = 256;

' Get the current RequestLimit property value.
Dim requestLimitValue As Int32 = traceSection.RequestLimit

' Set the RequestLimit property to 256.
traceSection.RequestLimit = 256

Remarks

The maximum request limit is 10,000. If a value greater than 10,000 is specified, it is silently rounded down to 10,000 by ASP.NET.

The MostRecent property gets or sets a value that determines whether the requests stored on the server are the most recent requests or the first requests to arrive.

Note When the number of requests exceeds the limit imposed by this setting and MostRecent is false, no more requests are stored in the trace log. If MostRecent is true, the most recent requests are stored up to the limit imposed by this setting and older requests are discarded.

Applies to

See also