TraceSection.RequestLimit 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示 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 属性获取或设置一个值,该值确定存储在服务器上的请求是最新的请求还是要到达的第一个请求。
注意 当请求数超过此设置施加的限制并且 MostRecent 是 false,则跟踪日志中不会存储更多请求。
true如果是MostRecent,则最新请求将存储到此设置施加的限制,旧请求将被丢弃。