ProcessModelSection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在 Internet Information Services(IIS)網頁伺服器上配置 ASP.NET 流程模型設定。 此類別無法獲得繼承。
public ref class ProcessModelSection sealed : System::Configuration::ConfigurationSection
public sealed class ProcessModelSection : System.Configuration.ConfigurationSection
type ProcessModelSection = class
inherit ConfigurationSection
Public NotInheritable Class ProcessModelSection
Inherits ConfigurationSection
- 繼承
範例
此範例示範如何宣告性地指定多個區段屬性的值,這些屬性 processModel 也可作為類別成員 ProcessModelSection 存取。
以下設定檔範例說明如何以宣告方式 processModel 指定該區段的值。
<processModel
enable="True" timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="00:00:05" requestLimit="Infinite"
requestQueueLimit="5000" restartQueueLimit="10"
memoryLimit="60" webGarden="False" cpuMask="0xffffffff"
userName="machine" logLevel="Errors"
clientConnectedCheck="00:00:05"
comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00"
responseRestartDeadlockInterval="00:03:00" autoConfig="True"
maxWorkerThreads="20" maxIoThreads="20" minWorkerThreads="1"
minIoThreads="1" serverErrorMessageFile="" pingFrequency="Infinite"
pingTimeout="Infinite" asyncOption="20" maxAppDomains="2000"
/>
以下程式碼範例示範如何使用這個 ProcessModelSection 類別。
// Get the Web application configuration
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the section.
System.Web.Configuration.ProcessModelSection
processModelSection =
(ProcessModelSection)configuration.GetSection(
"system.web/processModel");
' Get the Web application configuration
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration("/aspnetTest")
' Get the section.
Dim processModelSection _
As System.Web.Configuration.ProcessModelSection = _
CType(configuration.GetSection( _
"system.web/processModel"), ProcessModelSection)
備註
這個 ProcessModelSection 類別提供一種程式化的方式,可以存取並修改設定檔的該 processModel 區段。
ProcessModelSection 類別控制 ASP.NET 工作程序的多個面向,包括其生命週期、一次建立的實例數量、其執行的安全身份,以及 CLR 執行緒池用於服務請求的大小。
當 ASP.NET 以原生模式在 IIS 6 下運行時,ASP.NET 使用 IIS 6 的程序模型,並忽略本節大部分設定。 使用 IIS 管理使用者介面(UI)來設定這些屬性。 ASP.NET 仍使用以下屬性,可透過設定檔設定:RequestQueueLimit、ResponseDeadlockInterval、MaxWorkerThreads、MaxIOThreads、MinWorkerThreads,以及 MinWorkerThreads。
processModel 區段無法使用受保護配置功能或工具加密,因為它會被 ASP.NET ISAPI 擴充套件所佔用。
建構函式
| 名稱 | Description |
|---|---|
| ProcessModelSection() |
使用預設設定初始化該類別的新實例 ProcessModelSection 。 |
屬性
| 名稱 | Description |
|---|---|
| AutoConfig |
取得或設定一個值,指示 ASP.NET 效能設定是否自動為 ASP.NET 應用程式設定。 |
| ClientConnectedCheck |
會接收或設定一個值,表示請求在佇列中剩餘的時間。 |
| ComAuthenticationLevel |
取得或設定一個值,表示 DCOM 安全性的認證層級。 |
| ComImpersonationLevel |
取得或設定一個值,表示 COM 安全性的認證層級。 |
| CpuMask |
取得或設定一個值,表示多處理器伺服器上哪些處理器有資格執行 ASP.NET 程序。 |
| CurrentConfiguration |
取得最上層 Configuration 實例的參考,表示目前 ConfigurationElement 實例所屬的組態階層。 (繼承來源 ConfigurationElement) |
| ElementInformation |
取得 ElementInformation 物件,其中包含 ConfigurationElement 物件的不可自定義資訊和功能。 (繼承來源 ConfigurationElement) |
| ElementProperty |
取得代表 ConfigurationElementProperty 物件本身的 ConfigurationElement 物件。 (繼承來源 ConfigurationElement) |
| Enable |
取得或設定一個值,指示流程模型是否啟用。 |
| EvaluationContext |
取得 ContextInformation 物件的 ConfigurationElement 物件。 (繼承來源 ConfigurationElement) |
| HasContext |
取得值,這個值表示 CurrentConfiguration 屬性是否 |
| IdleTimeout |
取得或設定一個值,表示非活動期間,過後 ASP.NET 自動結束工作程序。 |
| Item[ConfigurationProperty] |
取得或設定這個組態項目的屬性或屬性。 (繼承來源 ConfigurationElement) |
| Item[String] |
取得或設定這個組態專案的屬性、屬性或子專案。 (繼承來源 ConfigurationElement) |
| LockAllAttributesExcept |
取得鎖定屬性的集合。 (繼承來源 ConfigurationElement) |
| LockAllElementsExcept |
取得鎖定專案的集合。 (繼承來源 ConfigurationElement) |
| LockAttributes |
取得鎖定屬性的集合。 (繼承來源 ConfigurationElement) |
| LockElements |
取得鎖定專案的集合。 (繼承來源 ConfigurationElement) |
| LockItem |
取得或設定值,指出專案是否已鎖定。 (繼承來源 ConfigurationElement) |
| LogLevel |
取得或設定一個值,指示要記錄到事件日誌的事件類型。 |
| MaxAppDomains |
取得或設定一個程序中允許的最大應用域數。 |
| MaxIOThreads |
取得或設定一個值,表示 CLR 執行緒池中每個 CPU 最大 I/O 執行緒數。 |
| MaxWorkerThreads |
取得或設定一個值,表示 CLR 執行緒池中每個 CPU 工作執行緒的最大數量。 |
| MemoryLimit |
取得或設定一個表示最大允許記憶體容量的值。 |
| MinIOThreads |
在 CLR 執行緒池中取得或設定每個 CPU 最少的 I/O 執行緒數。 |
| MinWorkerThreads |
取得或設定 CLR 執行緒池中每個 CPU 最少的工作執行緒數。 |
| Password |
它會取得或設定一個值,指示用於 Windows 身份的密碼。 |
| PingFrequency |
取得或設定一個值,指示 ISAPI 擴充功能在何時 ping 工作程序以判斷其是否正在執行。 |
| PingTimeout |
取得或設定一個值,指示非回應式工作程序在何時後重新啟動。 |
| Properties |
取得屬性的集合。 (繼承來源 ConfigurationElement) |
| RequestLimit |
取得或設定一個值,表示在工作程序被回收前允許的請求數量。 |
| RequestQueueLimit |
接收或設定一個值,表示佇列中允許的請求數量。 |
| ResponseDeadlockInterval |
取得或設定一個值,指示工作程序回應的時間區間。 |
| ResponseRestartDeadlockInterval |
不再使用。 |
| RestartQueueLimit |
在等待新的工作程序開始處理請求時,會取得或設定一個值,表示 ISAPI 排隊的請求數量上限。 |
| SectionInformation |
取得 SectionInformation 一個包含該物件不可自訂資訊與功能的 ConfigurationSection 物件。 (繼承來源 ConfigurationSection) |
| ServerErrorMessageFile |
取得或設定一個值,指示發生致命錯誤時必須使用的檔案內容。 |
| ShutdownTimeout |
會取得或設定一個值,表示工作程序關閉的時間。 |
| Timeout |
取得或設定一個值,表示距離 ASP.NET 啟動新工作程序的分鐘數。 |
| UserName |
取得或設定一個 Windows 身份的使用者名稱值。 |
| WebGarden |
取得或設定一個值,使可用 CPU 能夠執行工作程序。 |