Posted on: 2/27/2014 4:34:13 PM | Views : 736

I'm attempting to build a solution that allows a user name to be passed in and unlocks the user account.  
It appears to work properly, however the account never unlocks.  If I could specify a domain controller to unlock to, that would also be nice.
Format for URL: http://website/activedirectory/index/<username>
namespace MvcAD.Controllers { public class ActiveDirectoryController : Controller { // // GET: /ActiveDirectory/ public ActionResult Index(string userDn) { try { DirectoryEntry uEntry = new DirectoryEntry(userDn); uEntry.Properties["LockOutTime"].Value = 0; uEntry.Close(); } catch (System.DirectoryServices.DirectoryServicesCOMException E) { } ...

Go to the complete details ...