Welcome to MSDN Blogs Sign in | Join | Help

Decrypt my World

Cryptography, Security, Debugging and more!

Browse by Tags

All Tags » System.DirectoryServices   (RSS)
System.DirectoryServices.DirectorySynchronization returns access denied with non-admin users
Hi all, You may get an Access Denied error ( COMException 0x80070005 ) when using System.DirectoryServices.DirectorySynchronization in your .NET application with a non-admin user , but everything works fine with a domain administrator. This issue will Read More...
ChangePassword method may fail with TargetInvocationException (.NET)
Hi all, welcome back, When working with System.DirectoryServices.DirectoryEntry in .NET , we may change the password of the user with a code like the following ( C# ): user.Invoke("ChangePassword", new object[] { oldPassword, newPassword } But invoking Read More...
How to get ADs Providers list (C#)
Hi, welcome back, We may want to get the list of Active Directory Providers (" LDAP: ", " WinNT: ", " IIS: "...) with .NET the same way we do it with this VBScript : Set ads = GetObject("ADs:") For Each provider In ads Wscript.Echo provider.Name Next Read More...
How to get Password Expiration Date with System.DirectoryServices (C#)
Hi, welcome back, You may want to get Password Expiration Date for a given user with System.DirectoryServices . You may be tempted to use a code like the following: DirectoryEntry entry = new DirectoryEntry(path); object obj = entry.Properties["PasswordExpirationDate"].Value; Read More...
Page view tracker