Bagikan melalui


ProcessModelSection.IdleTimeout Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan periode tidak aktif setelah itu ASP.NET secara otomatis mengakhiri proses pekerja.

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

Nilai Properti

Nilai TimeSpan yang menunjukkan waktu menganggur. Nilai defaultnya adalah Infinite, yang sesuai dengan TimeSpan.MaxValue.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mengakses IdleTimeout properti .


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

Keterangan

Proses pekerja dimulai ulang (terpental) ketika IdleTimeout nilai properti tercapai. Secara default, hanya dua kondisi yang menyebabkan proses memantul: proses melebihi batas memori yang diizinkan, atau proses melebihi jumlah permintaan yang diizinkan yang dapat diantrekan. Anda dapat menambahkan kondisi lain ke kondisi default. Misalnya, Anda dapat menggunakan IdleTimeout properti untuk membatasi waktu proses pekerja diam.

Berlaku untuk