문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top