deActiveDirectoryEntry = New DirectoryEntry("GC://RootDSE") dsAuthenticateDirectorEntry = New DirectoryEntry(String.Concat("GC://", deActiveDirectoryEntry.Properties("rootDomainNamingContext").Value.ToString())) dsSearchDir = New DirectorySearcher(dsAuthenticateDirectorEntry) dsSearchDir.Filter = "(&(objectClass=user)(|(displayName=" + strPRID + ") (distinguishedName=" + strPRID + ")))" dsSearchDir.PropertiesToLoad.Add("mail") srResultValue = dsSearchDir.FindOne() usermail = srResultValue.Properties("mail")(0)
dsSearchDir.Filter = "(&(objectClass=user)(|(displayName=" + strPRID + ")
(objectClass=User)(objectClass=Group)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)