|
|
От: | beginner | |
| Дата: | 08.04.03 13:01 | ||
| Оценка: | |||
DirectoryEntry entry = new DirectoryEntry(this.LDAPProviderPath);
System.DirectoryServices.DirectorySearcher searcher = new
System.DirectoryServices.DirectorySearcher(entry);
searcher.Filter = "(SAMAccountName=" + login + ")";
searcher.PropertiesToLoad.Add("displayName");
SearchResult result = searcher.FindOne();
string fullName = result.Properties["displayName"][0].ToString();Единственный вразумительный совет, который я нашел в Инете — это юзание DirectoryEntry.InvokeHandling of this ADSVALUE type is not yet implemented (type = 0xb).
string fullName = result.GetDirectoryEntry().Invoke("Get","displayName").ToString();The Active Directory datatype cannot be converted to/from a native DS datatype