Редагувати

Поділитися через


ProcessModelSection.ComImpersonationLevel Property

Definition

Gets or sets a value indicating the level of authentication for COM security.

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

Property Value

One of the ProcessModelComImpersonationLevel values. The default value is Impersonate.

Attributes

Examples

The following code example shows how to access the ComImpersonationLevel property.


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

Remarks

When this property value is set to Default, DCOM determines the impersonation level using its normal security-negotiation algorithm. The default value assigned to this property, as specified in the Machine.config file, is Impersonate. In this case, the server process can impersonate the client's security context while acting on behalf of the client.

Applies to