CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of directory
C#
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)
by Eugene Cheverda   August 27, 2010 @ 2:30am
387 Views
no comments
 
C#
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);
by nobodybutca   October 04, 2009 @ 7:40pm
190 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate