Επεξεργασία

Κοινή χρήση μέσω


ProcessModelSection.IdleTimeout Property

Definition

Gets or sets a value indicating the period of inactivity after which ASP.NET automatically ends the worker process.

public:
 property TimeSpan IdleTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]
[System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")]
public TimeSpan IdleTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))>]
[<System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")>]
member this.IdleTimeout : TimeSpan with get, set
Public Property IdleTimeout As TimeSpan

Property Value

A TimeSpan value indicating the idle time. The default value is Infinite, which corresponds to TimeSpan.MaxValue.

Attributes

Examples

The following code example shows how to access the IdleTimeout property.


// Get the current IdleTimeout property value.
TimeSpan idleTimeout = 
    processModelSection.IdleTimeout;

// Set the IdleTimeout property to TimeSpan.Parse("12:00:00").
processModelSection.IdleTimeout = 
    TimeSpan.Parse("12:00:00");
' Get the current IdleTimeout property value.
   Dim idleTimeout As TimeSpan = _
   processModelSection.IdleTimeout

' Set the IdleTimeout property to TimeSpan.Parse("12:00:00").
   processModelSection.IdleTimeout = _
   TimeSpan.Parse("12:00:00")

Remarks

The worker process is restarted (bounced) when the IdleTimeout property value is reached. By default, only two conditions cause the process to bounce: the process exceeds the allowed memory limit, or the process exceeds the allowed number of requests that can be queued. You can add other conditions to the default ones. For example, you can use the IdleTimeout property to limit the time the worker process is idle.

Applies to