ContextOptions 枚举

定义

指定绑定到服务器时使用的选项。Specifies the options that are used for binding to the server. 应用程序可以设置多个与按位“或”运算链接的选项。The application can set multiple options that are linked with a bitwise OR operation.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class ContextOptions
[System.Flags]
public enum ContextOptions
type ContextOptions = 
Public Enum ContextOptions
继承
ContextOptions
属性

字段

Negotiate 1

对客户端进行身份验证时使用 Kerberos 或 NTLM。The client is authenticated by using either Kerberos or NTLM. 如果未提供用户名和密码,帐户管理 API 将使用调用线程的安全上下文来绑定到对象,该上下文是运行应用程序时使用的用户帐户的安全上下文,或是调用线程表示的客户端用户帐户的安全上下文。When the user name and password are not provided, the Account Management API binds to the object by using the security context of the calling thread, which is either the security context of the user account under which the application is running or of the client user account that the calling thread represents.

Sealing 16

数据通过使用 Kerberos 进行加密。The data is encrypted by using Kerberos. 此标志只能与 Negotiate 上下文选项一起使用,不能用于简单绑定选项。This flag can only be used with the Negotiate context option and is not available with the simple bind option.

SecureSocketLayer 4

通道通过使用安全套接字层 (SSL) 进行加密。The channel is encrypted by using the Secure Sockets Layer (SSL). Active Directory 要求安装证书服务来支持 SSL。Active Directory requires that the Certificate Services be installed to support SSL.

ServerBind 32

如果应用程序绑定到特定服务器名称,则在使用域上下文类型时,请指定此标志。Specify this flag when you use the domain context type if the application is binding to a specific server name.

Signing 8

验证数据的完整性。The integrity of the data is verified. 此标志只能与 Negotiate 上下文选项一起使用,不能用于简单绑定选项。This flag can only be used with the Negotiate context option and is not available with the simple bind option.

SimpleBind 2

对客户端进行身份验证时使用基本身份验证。The client is authenticated by using the Basic authentication.

注意:如果未使用简单绑定指定 SecureSocketsLayer 选项,则可通过 Internet 以明文形式发送通信。Caution: Communications may be sent over the Internet in clear text if the SecureSocketsLayer option is not specified with simple bind.

注解

如果上下文选项未指定应用程序中,帐户管理 API 将使用以下选项组合:When the context options are not specified by the application, the Account Management API uses the following combination of options:

  • ContextOptions.Negotiate | ContextOptions.Signing | ContextOptions.SealingContextOptions.Negotiate | ContextOptions.Signing | ContextOptions.Sealing

适用于