简体   繁体   中英

DirectoryEntry from LDAP or from WinNT. How can I know it?

I'm developing a C# .NET Framework 4.0 library and I want to know if a DirectoryEntry is from LDAP or from a local machine. How can I know that?

On DirectoryEntry there is a property called Path that starts with "LDAP" or "WinNT". Is this the only way to know it?

Here is a good page from Richard Mueller that lists/compares common attributes for WinNT and LDAP objects. I would suggest checking for "cn" or "samaccountname" attributes if you don't want to string match the path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM