共用方式為


ProcessModelSection.ComImpersonationLevel 屬性

定義

取得或設定值,表示 COM 安全性的驗證等級。

public:
 property System::Web::Configuration::ProcessModelComImpersonationLevel ComImpersonationLevel { System::Web::Configuration::ProcessModelComImpersonationLevel get(); void set(System::Web::Configuration::ProcessModelComImpersonationLevel value); };
[System.Configuration.ConfigurationProperty("comImpersonationLevel", DefaultValue=System.Web.Configuration.ProcessModelComImpersonationLevel.Impersonate)]
public System.Web.Configuration.ProcessModelComImpersonationLevel ComImpersonationLevel { get; set; }
[<System.Configuration.ConfigurationProperty("comImpersonationLevel", DefaultValue=System.Web.Configuration.ProcessModelComImpersonationLevel.Impersonate)>]
member this.ComImpersonationLevel : System.Web.Configuration.ProcessModelComImpersonationLevel with get, set
Public Property ComImpersonationLevel As ProcessModelComImpersonationLevel

屬性值

其中一個 ProcessModelComImpersonationLevel 值。 預設值是 Impersonate

屬性

範例

下列程式碼範例示範如何存取 ComImpersonationLevel 屬性。


// Get the current ComImpersonationLevel property value.
ProcessModelComImpersonationLevel comImpLevel = 
    processModelSection.ComImpersonationLevel;

// Set the ComImpersonationLevel property to
// ProcessModelComImpersonationLevel.Anonymous.
processModelSection.ComImpersonationLevel = 
    ProcessModelComImpersonationLevel.Anonymous;
' Get the current ComImpersonationLevel property value.
   Dim comImpLevel _
   As ProcessModelComImpersonationLevel = _
   processModelSection.ComImpersonationLevel

' Set the ComImpersonationLevel property to
' ProcessModelComImpersonationLevel.Anonymous.
   processModelSection.ComImpersonationLevel = _
   ProcessModelComImpersonationLevel.Anonymous

備註

當這個屬性值設定為 Default 時,DCOM 會使用其一般安全性交涉演算法來判斷模擬層級。 指派給此屬性的預設值,如Machine.config檔案中所指定, 為 Impersonate 。 在此情況下,伺服器進程可以模擬用戶端的安全性內容,同時代表用戶端。

適用於