Share via


TraceSection.RequestLimit 属性

定义

获取或设置一个值,该值指示对 ASP.NET 为其存储跟踪信息的应用程序的最大请求数。

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

属性值

存储在服务器上的最大请求数。 默认值为 10。

属性

示例

下面的代码示例说明如何使用 RequestLimit 属性。 此代码示例是为 TraceSection 类提供的一个更大示例的一部分。


// 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

注解

最大请求限制为 10,000。 如果指定了大于 10,000 的值,则通过 ASP.NET 以无提示方式向下舍入到 10,000。

属性 MostRecent 获取或设置一个值,该值确定存储在服务器上的请求是最新的请求还是要到达的第一个请求。

注意 当请求数超过此设置施加的限制并且 MostRecentfalse时,跟踪日志中不再存储更多请求。 如果 MostRecenttrue,则最新请求存储到此设置施加的限制,旧请求将被丢弃。

适用于

另请参阅