ImpersonationLevelOption ImpersonationLevelOption ImpersonationLevelOption ImpersonationLevelOption Enum

定义

指定调用服务器应用程序的目标时允许的模拟级别。Specifies the level of impersonation allowed when calling targets of a server application.

public enum class ImpersonationLevelOption
[System.Serializable]
public enum ImpersonationLevelOption
type ImpersonationLevelOption = 
Public Enum ImpersonationLevelOption
继承
ImpersonationLevelOptionImpersonationLevelOptionImpersonationLevelOptionImpersonationLevelOption
属性

字段

Anonymous Anonymous Anonymous Anonymous 1

客户端对于服务器而言是匿名的。The client is anonymous to the server. 服务器进程可以模拟客户端,但模拟标记不包含与客户端有关的任何信息。The server process can impersonate the client, but the impersonation token does not contain any information about the client.

Default Default Default Default 0

将默认的模拟级别用于指定的身份验证服务。Uses the default impersonation level for the specified authentication service. 在 COM+ 中,此设置由 DefaultImpersonationLevel 集合中的 LocalComputer 属性提供。In COM+, this setting is provided by the DefaultImpersonationLevel property in the LocalComputer collection.

Delegate Delegate Delegate Delegate 4

功能最强大的模拟级别。The most powerful impersonation level. 如果选择了该级别,则服务器(无论是本地的还是远程的)可以在代表客户端的同时模拟客户端的安全上下文。When this level is selected, the server (whether local or remote) can impersonate the client's security context while acting on behalf of the client

Identify Identify Identify Identify 2

系统默认级别。The system default level. 服务器可以获取客户端的标识,并且服务器可以模拟客户端以进行 ACL 检查。The server can obtain the client's identity, and the server can impersonate the client to do ACL checks.

Impersonate Impersonate Impersonate Impersonate 3

服务器可以在代表客户端的同时模拟客户端的安全上下文。The server can impersonate the client's security context while acting on behalf of the client. 服务器可以访问作为客户端的本地资源。The server can access local resources as the client.

示例

下面的代码示例演示如何将此枚举与ApplicationAccessControlAttribute属性一起使用。The following code example demonstrates the use of this enumeration in conjunction with the ApplicationAccessControlAttribute attribute.

// Set component access controls.
[assembly:ApplicationAccessControl(Authentication=AuthenticationOption::Privacy,
ImpersonationLevel=ImpersonationLevelOption::Identify,
AccessChecksLevel=AccessChecksLevelOption::ApplicationComponent)];
// Set component access controls.
[assembly: ApplicationAccessControl(Authentication=AuthenticationOption.Privacy,
                                    ImpersonationLevel=ImpersonationLevelOption.Identify,
                                    AccessChecksLevel=AccessChecksLevelOption.ApplicationComponent)]
' Set component access controls.
<Assembly: ApplicationAccessControl(Authentication:=AuthenticationOption.Privacy, ImpersonationLevel:=ImpersonationLevelOption.Identify, AccessChecksLevel:=AccessChecksLevelOption.ApplicationComponent)> 

注解

如果模拟成功, 则客户端允许服务器将客户端模拟一定程度。If impersonation succeeds, the client lets the server impersonate the client to some degree. 不同程度的模拟称为模拟级别, 它们表示在模拟客户端时向服务器提供的权限量。The varying degrees of impersonation are called impersonation levels, and they indicate how much authority is given to the server when it is impersonating the client.

对于库 (inproc) 应用程序, 唯一有效的设置Default为或未指定。For library (inproc) applications, the only valid settings are Default or none specified.

适用于