Bewerken

Delen via


ProcessModelComImpersonationLevel Enum

Definition

Specifies the authentication level for COM security.

public enum class ProcessModelComImpersonationLevel
public enum ProcessModelComImpersonationLevel
type ProcessModelComImpersonationLevel = 
Public Enum ProcessModelComImpersonationLevel
Inheritance
ProcessModelComImpersonationLevel

Fields

Name Value Description
Default 0

Specifies that DCOM determines the impersonation level using its normal security-negotiation algorithm.

Anonymous 1

Specifies that the client is anonymous to the server. The server can impersonate the client, but the impersonation token will not contain any information.

Delegate 2

Specifies that the server process can impersonate the client's security context while acting on behalf of the client. The server process can make outgoing calls to other servers while acting on behalf of the client by using cloaking. The server can use the client's security context on other computers to access local and remote resources as the client. When the process is impersonating the client at this level, the impersonation token can be passed across any number of computer boundaries.

Identify 3

Specifies that the server can obtain the client's identity. The server can impersonate the client for access control list (ACL) checking, but it cannot access system objects as the client.

Impersonate 4

Specifies that the server process can impersonate the client's security context while acting on behalf of the client. This level of impersonation can be used to access local resources such as files. When the process is impersonating the client at this level, the impersonation token can be passed across only one computer boundary.

Examples

The following 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

ProcessModelComImpersonationLevel defines the values to use when you set the ProcessModelSection.ComImpersonationLevel property.

The default value is Impersonate.

Applies to

See also