ImpersonationLevel Enumeration
Specifies the impersonation level that the server can use to impersonate the client.
Syntax
public enum ImpersonationLevel
Members
Impersonation
Value: 2
The server can impersonate the client on the local computer but cannot redirect the client's identity to other computers.
Impersonation = 2
Identification
Value: 1
The server can impersonate the client on the local computer. This is the default impersonation level.
Identification = 1
Anonymous
Value: 0
The server can impersonate the client's anonymous token. The identity of the client is not passed to the server.
Anonymous = 0
Delegation
Value: 3
The server can impersonate the client on the local computer and can redirect the client's identity to other computers.
Delegation = 3
Remarks
The ImpersonationLevel enumeration is used by the NegotiateStream.AuthenticateAsServer method to set the impersonation level of the server when it authenticates a client.
When using Network protocols, the impersonation level determines the extent to which a server can perform operations on behalf of a client.
Anonymous: The least privileged level. The server can only act as an anonymous user.Identification: The server can establish the client's identity and the client's security context on the local server.Impersonation: The server can impersonate the client on the local machine.Delegation: The most privileged level. The server can impersonate the client on the local machine and redirect the client's identity to other machines. This level requires specific security configurations on both the client and server.
Setting an appropriate impersonation level is crucial for security. You should always choose the lowest level of impersonation that satisfies your application's requirements.
Requirements
Client: Windows 7, Windows Vista, Windows XP SP3, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003 SP2
Server: Windows 7, Windows Vista, Windows XP SP3, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003 SP2
.NET Framework versions:
- 4.5, 4.0
- 3.5