zoukankan      html  css  js  c++  java
  • 学习:DirectoryEntry::Path 属性(winnt、LDAP、IIS)(转)


    获取或设置此 DirectoryEntry 的路径。

    命名空间:  System.DirectoryServices
    程序集:  System.DirectoryServices(在 System.DirectoryServices.dll 中)

    http://i.msdn.microsoft.com/Global/Images/clear.gif 语法

     

    C#

    [SettingsBindableAttribute(true)]
    [TypeConverterAttribute("System.Diagnostics.Design.StringValueConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [DSDescriptionAttribute("DSPath")]
    public string Path { get; set; }

     

    JScript

    public function get Path () : String
    public function set Path (value : String)

    属性值

    类型:System..::.String

    DirectoryEntry 对象的路径。默认值为空字符串 ("")

    http://i.msdn.microsoft.com/Global/Images/clear.gif 备注

    Path 属性唯一地标识网络环境中的此项。始终可以使用此 Path 检索此项。

    设置 Path 将从目录存储区检索新项;它不更改当前绑定的项的路径。

    DirectoryEntry 组件关联的类可与任何 Active Directory 域服务提供程序一起使用。当前的一些提供程序包括 Internet 信息服务 (IIS)、轻量目录访问协议 (LDAP)Novell NetWare 目录服务 (NDS) WinNT

    http://i.msdn.microsoft.com/dwyktsdz.alert_note(zh-cn,VS.90).gif说明:

    标识提供程序(在“://”前面)的 Path 部分是区分大小写的。例如,“LDAP://”“WinNT://”

    Path 属性的语法随提供程序不同而不同。一些常见的情况有:

    WinNT

    ·         连接到计算机上的组。例如“WinNT://<域名>/<计算机名>/<组名>。如果是连接到本地计算机,则为“WinNT://<计算机名>/<组名>

    ·         连接到计算机上的用户。例如“WinNT://<域名>/<计算机名>/<用户名>。如果是连接到本地计算机,则为“WinNT://<计算机名>/<用户名>

    ·         连接到计算机上的服务。例如“WinNT://<域名>/<计算机名>/<服务名>。如果是连接到本地计算机,则为“WinNT://<计算机名>/<服务名>

    ·         发现网络上的所有域。例如,“WinNT:”通过枚举此项的子级可以找到这些域。

    LDAP

    ·         连接到域中的组。例如“LDAP://CN=<组名>, CN =<用户>, DC=<域组件>, DC=<域组件>,...”

    ·         连接到域中的用户。例如“LDAP://CN=<完整用户名>, CN=<用户>, DC=<域组件>, DC=<域组件>,...”

    ·         连接到域中的计算机。例如“LDAP://CN=<计算机名>, CN=<计算机>, DC=<域组件>, DC=<域组件>,...”

    IIS

    ·         连接到 Web 目录。例如“IIS://LocalHost/W3SVC/1/ROOT/<Web 目录名>”

    若要使用 LDAP 绑定到当前域,请使用路径“LDAP://RootDSE”,然后获取默认命名上下文,并重新绑定该项。例如:

    C#

    http://i.msdn.microsoft.com/Global/Images/clear.gif复制代码

    String str = ent.Properties["defaultNamingContext"][0];
    DirectoryEntry domain = new DirectoryEntry("LDAP://" + str);

    有关更多信息,请参见提供程序文档和位于 http://msdn.microsoft.com/library 上的 MSDN Library 中的主题 Using Active Directory Serv(使用 Active Directory 服务)。

    http://i.msdn.microsoft.com/Global/Images/clear.gif

  • 相关阅读:

    双向链表
    obs分析 笔记
    循环链表
    静态链表
    链式顺序表
    线性表
    ffmpeg-4.1.1-win64-dev在vs2017的搭建
    G1 与 CMS 两个垃圾收集器的对比
    垃圾回收算法有几种类型? 他们对应的优缺点又是什么?
  • 原文地址:https://www.cnblogs.com/LeimOO/p/1559267.html
Copyright © 2011-2022 走看看