WindowsIdentity.ImpersonationLevel Propiedad

Definición

Obtiene el nivel de suplantación del usuario.

public:
 property System::Security::Principal::TokenImpersonationLevel ImpersonationLevel { System::Security::Principal::TokenImpersonationLevel get(); };
public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get; }
member this.ImpersonationLevel : System.Security.Principal.TokenImpersonationLevel
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.ImpersonationLevel : System.Security.Principal.TokenImpersonationLevel
Public ReadOnly Property ImpersonationLevel As TokenImpersonationLevel

Valor de propiedad

TokenImpersonationLevel

Uno de los valores de la enumeración que especifica el nivel de suplantación.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra el uso de la propiedad para mostrar el nivel de ImpersonationLevel suplantación del usuario actual. Este ejemplo de código forma parte de un ejemplo mayor proporcionado para la WindowsIdentity clase .

TokenImpersonationLevel token = windowsIdentity.ImpersonationLevel;
Console.WriteLine("The impersonation level for the current user is : " + token.ToString());
Dim token As TokenImpersonationLevel
token = windowsIdentity.ImpersonationLevel
Console.WriteLine("The impersonation level for the current user is : " + token.ToString())

Comentarios

Describe el nivel de suplantación que se utiliza para conectar WMI.

Se aplica a