Top "Directoryservices" questions

System.

Active Directory List OU's

I have this code currently, string defaultNamingContext; DirectoryEntry rootDSE = new DirectoryEntry("LDAP://RootDSE"); defaultNamingContext = rootDSE.Properties["defaultNamingContext"].Value.ToString(); rootDSE = …

c# active-directory ldap directoryservices
UserPrincipal.GetGroups fails with unknown error

I am trying to get all Active Directory groups for a user, with the following code: private static IEnumerable<…

.net active-directory directoryservices
DirectoryServices.AccountManagement "old" password still validates after password change

After resetting a users password in Active Directory, if the user tries to log in using their old password, the …

active-directory directoryservices account-management
Get closest Domain Controller in current AD site without hard coding information

For instances when Active Directory takes too long to replicate data between sites, I need to ensure that the local …

c# active-directory ldap directoryservices domaincontroller
"Unknown error (0x80005000)" trying to read remote IIS 6 Metabase with DirectoryEntry and Impersonation (C#)

(EDIT) The plot thickens: The same code (with no need for impersonation!) runs successfully from a Windows 7 client, but NOT …

.net iis-6 impersonation directoryservices metabase
Using StartTLS with LDAP from System.DirectoryServices

I'm trying to connect to an LDAP server which requires StartTLS, but having no luck - whenever I use either …

c# ldap directoryservices starttls
Updating Name Field on UserPrincipal

When I try to update the Name field (corresponds to the CN) on UserPrincipal (Principal, really), I get an error "…

c# directoryservices account-management
Programmatically add Local User to a Local Group

I am doing a C# application targeting WinXP, Vista, and 7 Operating Systems. One feature is, I can Add, Remove, Modify …

c# active-directory wmi directoryservices active-directory-group
ActiveDirectory error 0x8000500c when traversing properties

I got the following snippet (SomeName/SomeDomain contains real values in my code) var entry = new DirectoryEntry("LDAP://CN=SomeName,…

c# active-directory directoryservices
Mac OS X: Get current username and home directory for current user from Directory Services

My app is written in Objective-C. How can I get the user name and home directory of the currently logged …

objective-c macos directoryservices