Bagikan melalui


ProcessModelSection.Enable Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah model proses diaktifkan.

public:
 property bool Enable { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enable", DefaultValue=true)]
public bool Enable { get; set; }
[<System.Configuration.ConfigurationProperty("enable", DefaultValue=true)>]
member this.Enable : bool with get, set
Public Property Enable As Boolean

Nilai Properti

true jika model proses diaktifkan; jika tidak, false. Nilai defaultnya adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mengakses Enable properti .


// Get the current Enable property value.

bool enable = processModelSection.Enable;

// Set the Enable property to false.
processModelSection.Enable = false;
' Get the current Enable property value.
Dim enable As Boolean = processModelSection.Enable

' Set the Enable property to false.
processModelSection.Enable = False

Keterangan

Properti Enable menentukan apakah ASP.NET dihosting dalam proses pekerja eksternal. Jika Enable adalah true, ASP.NET dihosting dalam proses pekerja eksternal; jika tidak, ia berjalan langsung di Inetinfo.exe.

Catatan

Menjalankan ASP.NET di Inetinfo.exe tidak disarankan, karena ini melibatkan menjalankan aplikasi dalam konteks keamanan Sistem Lokal. Ketika ASP.NET berjalan dalam mode asli Internet Information Services (IIS) 6, pengaturan ini diabaikan, jadi biasanya tidak ada alasan untuk mengaturnya ke false.

Berlaku untuk