词条 | active dictionary service |
释义 | Active Directory Service Interfaces (ADSI) is a set of COM interfaces used to access the features of directory services from different network providers. ADSI is used in a distributed computing environment to present a single set of directory service interfaces for managing network resources. Administrators and developers can use ADSI services to enumerate and manage the resources in a directory service, no matter which network environment contains the resource. ADSI enables common administrative tasks, such as adding new users, managing printers, and locating resources in a distributed computing environment. System.DirectoryServices 命名空间用以从托管代码简便地访问 Active Directory。该命名空间包含两个组件类,即 DirectoryEntry 和 DirectorySearcher,它们使用 Active Directory 服务接口 (ADSI) 技术。ADSI 是 Microsoft 提供的一组接口,作为使用各种网络提供程序的灵活的工具。ADSI 使管理员能够相对方便地定位和管理网络上的资源,不管网络的大小如何。 此命名空间中的类可以与任何 Active Directory 服务提供程序一起使用。当前的一些提供程序包括 Internet 信息服务 (IIS)、轻量目录访问协议 (LDAP)、Novell NetWare 目录服务 (NDS) 和 WinNT。 ADSI 是 Microsoft Active Directory 的编程接口,使应用程序能够只使用一个接口就可以与网络上的不同目录交互。使用 ADSI,可以创建一些应用程序,用以执行常见任务,如备份数据库、访问打印机和管理用户帐户。 Active Directory 是一种树结构。树中的每个节点包含一组属性。使用此命名空间可遍历、搜索和修改树,以及读取和写入节点的属性。 DirectoryEntry 类封装 Active Directory 层次结构中的节点或对象。使用此类绑定到对象、读取属性和更新特性。DirectoryEntry 与帮助器类一起为生存期管理和导航方法提供支持,包括创建、删除、重命名、移动子节点和枚举子级。 使用 DirectorySearcher 类对 Active Directory 层次结构执行查询。LDAP 是系统提供的唯一一种支持搜索的 Active Directory 服务接口 (ADSI) 提供程序。 轻量级目录访问协议(LDAP)用于访问 X.500 的目录服务,它不会产生目录访问协议(DAP)访问 X.500 时所需的资源要求。本协议特别针对那些简单管理程序和浏览器程序,它们提供对 X.500 目录进行简单的读/写交互式访问,同时它也是对 DAP 本身的一种补充。 LDAP 的消息将协议数据单元(PDU)直接映射到 TCP 字节流,所用端口是389。LDAP 消息没有自己的信头,它是基于 ANS 的文本消息。为了能进行协议数据的交换,所有的协议操作都封装在一个通用信封中并进行压缩。LDAP 消息(LDAP Message)的功能是给所有的协议交换定义一个包含通用字段的信封。在现在,唯一的通用字段是一个消息标识符(ID)和控制信息。 Vegas 示例: //检查NT帐号 public bool CheckNTAccount(string UserName, string Password, string Domain) { DirectoryEntry Ad; // DirectorySearcher ds; string strLDAP = System.Configuration.ConfigurationSettings.AppSettings["LDAP"]; Ad = new DirectoryEntry(strLDAP, Domain + "\\\\" + UserName, Password, AuthenticationTypes.ServerBind); try { object obj = Ad.NativeObject; //检查是否可正常登入 return true; } catch (Exception) { return false; } finally { Ad.Dispose(); } } |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。