Learning: directoryentry: path attributes (winnt, LDAP, IIS)

Source: Internet
Author: User
Tags ldap


Obtain or set this Directoryentry.

Namespace:System. directoryservices
ProgramSet:System. directoryservices(InSystem. directoryservices. dllMedium)

 Syntax

 

C #

[Settingsbindableattribute (True)]
[Typeconverterattribute ("System. Diagnostics. Design. stringvalueconverter, system. Design, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a")]
[Dsdescriptionattribute ("Dspath")]
Public StringPath {Get;Set;}

 

JScript

Public Function GetPATH (): String
Public Function SetPATH (value: string)
Attribute Value

Type:System..::.String

This DirectoryentryObject Path. The default value is an empty string.("").

 Remarks

Path The attribute uniquely identifies this item in the network environment. You can always use this Path Search for this item.

Set Path The new item is retrieved from the directory store; it does not change the path of the currently bound item.

and directoryentry the class associated with the component can be any Active Directory is used together by the domain service provider. Some current providers include Internet Information Services (IIS) , Lightweight Directory Access Protocol (LDAP) , Novell Netware directory service (NDS) and winnt .

Note:

Identify the provider (in": //"Above) Path The parts are case sensitive. For example,"LDAP ://"Or"Winnt ://".

Path The property syntax varies with the provider. Some common situations include:

Winnt

· connect to the group on the computer. For example, "winnt : // domain name / computer name / group name " . If it is connected to a local computer, it is "winnt: // computer name / group name " .

· User connected to the computer. For example, "winnt: // domain name / computer name / User Name " . If it is connected to a local computer, it is "winnt: // computer name / User Name " .

· connect to the service on the computer. For example, "winnt: // domain name / computer name / Service name " . If it is connected to a local computer, it is "winnt: // computer name / service name " .

· All domains on the network are found. For example,"Winnt :"You can find these fields by enumerating the sublevel of this item.

LDAP

· Connect to the group in the domain. For example"LDAP: // Cn = <Group Name>, Cn = <User>, Dc = <Domain component>, Dc = <Domain component> ,...".

· Connect to users in the domain. For example"LDAP: // Cn = <Complete User Name>, Cn = <User>, Dc = <Domain component>, Dc = <Domain component> ,...".

· Connect to the computer in the domain. For example"LDAP: // Cn = <Computer Name>, Cn = <Computer>, Dc = <Domain component>, Dc = <Domain component> ,...".

IIS

· ConnectWebDirectory. For example"IIS: // localhost/w3svc/1/root/<WebDirectory Name>".

To useLDAPBind to the current domain. Use the path"LDAP: // rootdse"And then obtain the default naming context and rebind the item. For example:

C #

copy Code

  string STR = ent. properties [  "defaultnamingcontext"  ] [0];  
directoryentry domain = New directoryentry ( "LDAP: // " + Str);

For more information, see the provider documentation and Http://msdn.microsoft.com/libraryOnMsdn LibraryTopic in Using Active Directory Serv(UseActive DirectoryService ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.