Probably the path you supplied was not correct. Check that.
I would recomment the article Howto: (Almost) Everything In Active Directory via C# which really helped me in the past in dealing with AD.
More Related Contents:
- Validate a username and password against Active Directory?
- How can I get a list of users from active directory?
- Find Recursive Group Membership (Active Directory) using C#
- Can I get more than 1000 records from a DirectorySearcher?
- How to get the groups of a user in Active Directory? (c#, asp.net)
- ASP.NET Core 2.0 LDAP Active Directory Authentication
- How to programmatically change Active Directory password
- Adding and removing users from Active Directory groups in .NET
- How to get all the AD groups for a particular user?
- Active Directory COM Exception – An operations error occurred (0x80072020)
- Connect to Active Directory via LDAP
- How to check if a user belongs to an AD group?
- Error 0x80005000 and DirectoryServices
- ValidateCredentials returns true for unknown user?
- c# Active Directory Services findAll() returns only 1000 entries [duplicate]
- Built-in helper to parse User.Identity.Name into Domain\Username
- .NET 4.5 Bug in UserPrincipal.FindByIdentity (System.DirectoryServices.AccountManagement)
- C# Active Directory: Get domain name of user?
- Active Directory (LDAP) – Check account locked out / Password expired
- How do I validate Active Directory creds over LDAP + SSL?
- See if user is part of Active Directory group in C# + Asp.net
- How to get the current user’s Active Directory details in C#
- Why is .Contains slow? Most efficient way to get multiple entities by primary key?
- Efficient DataTable Group By
- Enumerating network shares
- Entity Framework – Invalid Column Name ‘*_ID”
- Download multiple files async and wait for all of them to finish before executing the rest of the code
- Overriding fields or properties in subclasses
- implementing a state machine using the “yield” keyword
- Generate JSON object with NewtonSoft in a single line