Export (0) Print
Expand All

TraceSection.RequestLimit Property

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

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

[IntegerValidatorAttribute(MinValue = )]
[ConfigurationPropertyAttribute("requestLimit", DefaultValue = )]
public int RequestLimit { get; set; }

Property Value

Type: System.Int32
The maximum number of requests to store on the server. The default is 10.

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.

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;

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft