Format:
Recent snippets matching tags of directory
internal class DirectoryManager { private static string makePath(string path, string searchPattern) { if (!path.EndsWith("\\")) path += "\\"; return Path.Combine(path, searchPattern); } private static IEnumerable<string> getInternal(string path, string searchPattern, bool isGetDirs)
387 Views
no comments
public bool IsADUsernameExistsAndNotDisabled(string userName) { DirectoryEntry searchRoot = new DirectoryEntry(ldapConnection, eCrewUserName, eCrewUserPassword); DirectoryEntry searchRoot = new DirectoryEntry("LDAP://999.999.999.999/DC=CompanyDomain, DC=com", "ADUserAdmin", "AdUserAdminPassword"); DirectorySearcher searchForUser = new DirectorySearcher(searchRoot); searchForUser.SearchScope = SearchScope.Subtree; //searchForUser.Filter = string.Format("(&(objectCategory=Person)(anr={0}))", userName); //searchForUser.Filter = string.Format("(&(objectCategory=Person)(anr={0})(userAccountControl:1.2.840.113556.1.4.803:=2))", userName);
190 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
