Share via


ProcessModelSection.ComImpersonationLevel Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan tingkat autentikasi untuk keamanan 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

Nilai Properti

Salah ProcessModelComImpersonationLevel satu nilai. Nilai defaultnya adalah Impersonate.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mengakses ComImpersonationLevel properti .


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

Keterangan

Ketika nilai properti ini diatur ke Default, DCOM menentukan tingkat peniruan menggunakan algoritma negosiasi keamanan normalnya. Nilai default yang ditetapkan ke properti ini, seperti yang ditentukan dalam file Machine.config, adalah Impersonate. Dalam hal ini, proses server dapat meniru konteks keamanan klien saat bertindak atas nama klien.

Berlaku untuk