Share via


ProcessModelSection 類別

定義

在網際網路資訊服務 (IIS) Web 伺服器上設定 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" password="AutoGenerate" 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 類別 (Class) 提供以程式的方法,存取和修改組態檔的 processModel 區段。

類別 ProcessModelSection 會控制 ASP.NET 背景工作進程的各個層面,包括其存留期、一次建立的實例數目、其執行的安全性身分識別,以及服務要求的 CLR 執行緒集區大小。

在原生模式的 IIS 6 下執行 ASP.NET 時,ASP.NET 會使用 IIS 6 進程模型,並忽略本節中的大部分設定。 使用 IIS 系統管理使用者介面 (UI) 來設定這些屬性。 ASP.NET 仍然使用下列屬性,可透過組態檔進行設定: RequestQueueLimit 、、 ResponseDeadlockIntervalMaxWorkerThreadsMaxIOThreadsMinWorkerThreadsMinWorkerThreads

processModel區段無法使用受保護的組態功能或工具進行加密,因為 ASP.NET ISAPI 擴充功能會取用該區段。

建構函式

ProcessModelSection()

使用預設值初始化 ProcessModelSection 類別的新執行個體。

屬性

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

取得 ConfigurationElement 物件的 ContextInformation 物件。

(繼承來源 ConfigurationElement)
HasContext

取得值,指出 CurrentConfiguration 屬性是否為 null

(繼承來源 ConfigurationElement)
IdleTimeout

取得或設定值,表示閒置時間,在這個期間之後,ASP.NET 會自動結束背景工作處理序。

Item[ConfigurationProperty]

取得或設定此組態項目的屬性 (Property) 或屬性 (Attribute)。

(繼承來源 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 執行背景工作處理序。

方法

DeserializeElement(XmlReader, Boolean)

從組態檔讀取 XML。

(繼承來源 ConfigurationElement)
DeserializeSection(XmlReader)

從組態檔讀取 XML。

(繼承來源 ConfigurationSection)
Equals(Object)

將目前的 ConfigurationElement 執行個體與指定的物件相比較。

(繼承來源 ConfigurationElement)
GetHashCode()

取得表示目前 ConfigurationElement 執行個體的唯一值。

(繼承來源 ConfigurationElement)
GetRuntimeObject()

在衍生類別中覆寫時,傳回自訂物件。

(繼承來源 ConfigurationSection)
GetTransformedAssemblyString(String)

傳回指定之組件名稱的轉換版本。

(繼承來源 ConfigurationElement)
GetTransformedTypeString(String)

傳回指定之型別名稱的轉換版本。

(繼承來源 ConfigurationElement)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
Init()

ConfigurationElement 物件設定為它的初始狀態。

(繼承來源 ConfigurationElement)
InitializeDefault()

用來初始化 ConfigurationElement 物件的預設值集。

(繼承來源 ConfigurationElement)
IsModified()

在衍生類別中進行實作時,指出這個組態項目自上次儲存或載入後是否已修改。

(繼承來源 ConfigurationSection)
IsReadOnly()

取得值,這個值表示 ConfigurationElement 物件是否唯讀。

(繼承來源 ConfigurationElement)
ListErrors(IList)

將這個 ConfigurationElement 物件中和所有子項目中的無效屬性錯誤加入傳遞的清單。

(繼承來源 ConfigurationElement)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnDeserializeUnrecognizedAttribute(String, String)

取得值,指出在還原序列化程序中是否遇到未知的屬性 (Attribute)。

(繼承來源 ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

取得值,指出在還原序列化程序中是否遇到未知的項目。

(繼承來源 ConfigurationElement)
OnRequiredPropertyNotFound(String)

在找不到必要的屬性時擲回例外狀況 (Exception)。

(繼承來源 ConfigurationElement)
PostDeserialize()

還原序列化之後呼叫。

(繼承來源 ConfigurationElement)
PreSerialize(XmlWriter)

序列化之前呼叫。

(繼承來源 ConfigurationElement)
Reset(ConfigurationElement)

重設 ConfigurationElement 物件的內部狀態,包括鎖定和屬性的集合。

(繼承來源 ConfigurationElement)
ResetModified()

在衍生類別中實作時,將 IsModified() 方法的值重設為 false

(繼承來源 ConfigurationSection)
SerializeElement(XmlWriter, Boolean)

在衍生類別中實作時,將此組態項目的內容寫入組態檔中。

(繼承來源 ConfigurationElement)
SerializeSection(ConfigurationElement, String, ConfigurationSaveMode)

建立 XML 字串,在該字串的單一區段中,包含了要寫入檔案之 ConfigurationSection 物件的取消合併檢視。

(繼承來源 ConfigurationSection)
SerializeToXmlElement(XmlWriter, String)

在衍生類別中實作時,將此組態項目的外部標記寫入組態檔中。

(繼承來源 ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

將屬性設定為指定的值。

(繼承來源 ConfigurationElement)
SetReadOnly()

設定 IsReadOnly() 物件和所有子項目的 ConfigurationElement 屬性。

(繼承來源 ConfigurationElement)
ShouldSerializeElementInTargetVersion(ConfigurationElement, String, FrameworkName)

指出當設定物件階層針對指定的目標版本序列化.NET Framework時,是否應該序列化指定的專案。

(繼承來源 ConfigurationSection)
ShouldSerializePropertyInTargetVersion(ConfigurationProperty, String, FrameworkName, ConfigurationElement)

指出當設定物件階層針對指定的目標版本的.NET Framework序列化時,是否應該序列化指定的屬性。

(繼承來源 ConfigurationSection)
ShouldSerializeSectionInTargetVersion(FrameworkName)

指出當設定物件階層針對指定的目標版本的.NET Framework序列化時,是否應該序列化目前的 ConfigurationSection 實例。

(繼承來源 ConfigurationSection)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

修改 ConfigurationElement 物件,以移除不應該儲存的所有值。

(繼承來源 ConfigurationElement)

適用於

另請參閱