[英]How to get Domains from a forest from Active Directory over LDAP SSL in c#
[英]How to connect to ldap data source other than Active Directory from c# code?
我期待從Active Directory以外的ldap數據源連接和檢索數據。 我嘗試使用DirectoryEntry,但它適用於Active Directory對象,因此似乎不能與其他人一起使用。 c#中還有其他選項來連接和從ldap源獲取數據嗎?
DirectoryEntry de = new DirectoryEntry(LDAP://127.0.0.1/CN=Users,dc=test,dc=com", UserName, Password, AuthenticationTypes.Secure);
DirectorySearcher ds = new DirectorySearcher(de);
ds.FindOne();
1.用您的IP替換“127.0.0.1”。 2. UserName = LDAP用戶名3. Passwoed = LDAP用戶密碼。 4. DC(域組件)=您的域組件5. CN(公用名)=您的公用名此代碼可用於連接LDAP服務器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.