System.DirectoryServices Namespace
https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices?view=netframework-4.7
The System.DirectoryServices namespace provides easy access to Active Directory Domain Services from managed code.
The namespace contains two component classes, DirectoryEntry and DirectorySearcher, which use the Active Directory Services Interfaces (ADSI) technology.
ADSI is the set of interfaces that Microsoft provides as a flexible tool for working with a variety of network providers.
ADSI gives the administrator the ability to locate and manage resources on a network with relative ease, regardless of the size of the network.
Remarks
The classes in this namespace can be used with any of the Active Directory Domain Services service providers.
The current providers are: Internet Information Services (IIS), Lightweight Directory Access Protocol (LDAP), Novell NetWare Directory Service (NDS), and WinNT.
ADSI is a programmatic interface for Microsoft Active Directory Domain Services that enables your applications to interact with diverse directories on a network using a single interface.
Using ADSI, you can create applications that perform common tasks, such as backing up databases, accessing printers, and administering user accounts.
It is assumed that you have a general understanding of Active Directory Domain Services before using these classes.
For more information on Active Directory Domain Services, see the topics
Introduction to Active Directory Objects
and
Active Directory Technology Backgrounder
, as well as the following topics in the MSDN library at http://msdn.microsoft.com/library:
Active Directory Domain Services use a tree structure.
Each node in the tree contains a set of properties.
Use this namespace to traverse, search, and modify the tree, and read and write to the properties of a node.
The DirectoryEntry class encapsulates a node or object in the Active Directory Domain Services hierarchy.
Use this class for binding to objects, reading properties, and updating attributes.
Together with helper classes, DirectoryEntry provides support for life-cycle management and navigation methods, including creating, deleting, renaming, moving a child node, and enumerating children.
Use the DirectorySearcher class to perform queries against the Active Directory Domain Services hierarchy. LDAP is the only system-supplied Active Directory Service Interfaces (ADSI) provider that supports searching.
A search of the Active Directory Domain Services hierarchy through DirectorySearcher returns instances of SearchResult, which are contained in an instance of the SearchResultCollection class.
Note: Many of the classes, methods, and properties in the System.DirectoryServices namespace use the LinkDemand code access security option.
This means that the code access security demand only occurs during just-in-time compilation and that the demand is performed only on the calling assembly and not up the entire call stack.
Because of this, callers should not pass objects that are created from this namespace at runtime to code that is not trusted.
System.DirectoryServices Namespace的更多相关文章
- .net core 操作域控 活动目录 ladp -- Support for System.DirectoryServices for Windows
原文链接:https://github.com/dotnet/corefx/issues/2089 1. @ianhays to kick start the project in CoreFX re ...
- C# 域用户操作(转)
转自:http://www.sobnb.com/u/92/20081406091447.html using System; using System.DirectoryServices; nam ...
- sharepoint修改密码
增加SharePoint2010修改域密码功能 前提SharePoint2010的用户基于AD的,因此修改密码是修改了AD的密码,当然也可以修改本机密码(非域的密码).这里我们讨论修改域密码.我们修改 ...
- ASP.NET 中通过Form身份验证 来模拟Windows 域服务身份验证的方法
This step-by-step article demonstrates how an ASP.NET application can use Forms authentication to ...
- C#代码配置IIS 操纵IIS
前言: IIS到目前经历了四个版本分别为 IIS4.0 IIS5.0 IIS6.0 IIS7.0,其中IIS6.0 IIS7.0是在5.0的安全问题的基础上获得的发展,目前为止.6.0版本以后的都是 ...
- 增加SharePoint2010修改域密码功能
转:http://blog.163.com/hr_test/blog/static/16485210720137953131694/ 前提 SharePoint2010的用户基于AD的,因此修改密码是 ...
- C#创建IIS站点及相应的应用程序池,支持IIS6.0+Windows Server 2003. 使用Builder设计模式
测试项目结构: PS:IIS6UtilsBuilder, IIS7UtilsBuilder,IISUtilsBuilder以及IISDirector为Builder设计模式实现的核心代码.Progra ...
- C#添加IIS站点
利用IIS7自带类库管理IIS现在变的更强大更方便,而完全可以不需要用DirecotryEntry这个类了(乐博网中很多.net管理iis6.0的文章都用到了DirecotryEntry这个类 ),M ...
- 如何通过使用窗体身份验证和 Visual C#.NET 对 Active Directory 验证身份
本分步指南演示如何在 ASP.NET 应用程序如何使用窗体身份验证允许用户使用轻型目录访问协议 (LDAP),对 Active Directory 进行验证.经过身份验证的用户重定向之后,可以使用Ap ...
随机推荐
- jupyter在特定环境特定目录中启动
代码如下: @echo off start %windir%\System32\cmd.exe "/c" D:\Anaconda\Scripts\activate.bat # 启动 ...
- Javascript中数组重排序方法详解
在数组中有两个可以用来直接排序的方法,分别是reverse()和sort().下面通过本文给大家详细介绍,对js 数组重排序相关知识感兴趣的朋友一起看看吧. 1.数组中已存在两个可直接用来重排序的方法 ...
- WPF 标题栏 右键窗口标题添加关于对话框
/// <summary> /// wpf标题栏 右键菜单 中添加新项 /// </summary> public partial class MainWindow : Win ...
- Shiro从数据表中初始化资源和权限
之前在测试的Web工程下,我们在applicationContext.xml中配置了shiroFilter资源拦截器信息: <bean id="shiroFilter" cl ...
- Swfit4.0中JSON与模型原生互转(JSONEncoder/JSONDecoder的使用)
在Objective-C中,苹果并没有提供JSON转模型(模型转JSON)的接口,往往在开中需要添加第三库来处理JSON数据,比如:JsonModel.MJExtension.Mantle.JsonK ...
- RxSwiftライブラリの作り方 〜Observer/Observable編〜
RxSwiftライブラリの作り方をご紹介します.一つの記事ですべてを説明するのは非常に厳しいので.まず Observer や Observable といった基本的なコンポーネントとその周辺について.ひ ...
- 从无到有创建一个grunt项目
在安装好grunt的前提下创建一个grunt的项目: 1.首先创建一个项目文件 就叫grunt-project 2.进入这个文件 创建一个index.html 在创建一个js文件,进去创建一个inde ...
- MySQL安装部署
MySQL安装部署 使用自动化脚本
- DB2解决死锁
方法一.查看db2diag.log文件 找到DeadLock or Lock timeout搜索 死锁或锁超时信息db2 force application(句柄ID)直接结束进程即可. 方法二.DB ...
- 路飞学城Python-Day113
107-HTTP协议的无状态保存 什么是无状态保存? HTTP无状态请求就是客户端每次发送的请求都是单独的新请求,每一次请求都是独立的,这样的特点在网站上就是服务器登录的时候记录浏览器的信息,建立 ...