ProcessModelSection.RequestLimit 属性

定义

获取或设置一个值,该值指示在回收辅助进程之前所允许的请求数。Gets or sets a value indicating the number of requests allowed before a worker process is recycled.

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

属性值

Int32

所允许的请求数。The number of allowed requests. 默认值为 Infinite。The default is Infinite.

属性

示例

下面的代码示例说明如何使用 RequestLimit 属性。The following code example shows how to use the RequestLimit property.


// Get the current RequestLimit property value.
int reqLimit = 
    processModelSection.RequestLimit;

// Set the RequestLimit property to 4096.
processModelSection.RequestLimit = 4096;

' Get the current RequestLimit property value.
   Dim reqLimit As Integer = _
   processModelSection.RequestLimit

' Set the RequestLimit property to 4096.
processModelSection.RequestLimit = 4096

注解

如果超过了请求数,ASP.NET 会自动启动一个新的工作进程来代替当前的工作进程。If the number of requests is exceeded, ASP.NET automatically launches a new worker process to take the place of the current one.

适用于