c# - Unwilling server: Can't unlock AD account in code -
When I try to unlock an e account using my own C # program, I get the following error: System.DirectoryServices.DirectoryServicesCOMException (0x80072035): The server is not ready to process the request This code I use to unlock the account is. I use this software in many domains and I get this error in one of them and I do not know what the difference is when i The error also occurs with different user objects, but both versions ( PS:? I use the Domain Administrator credentials to access the LDAP server Try:
// "ldap" (DirectoryEntry entry = ldap.GetEntry (objectGUID)) is an example of its own class to access an LDAP server using {entry.InvokeSet ("lockouttime ", 0); // I also tried: entry Properties ["LockoutTime"] clean (); Entry.CommitChanges (); }
dsa.msc < Using the / code> to unlock the account, everything works fine.
Clear and
InvokeSet ) work in other environments. Can anyone give me a hint
Public Zero Unlock (String UserDen) {try {directoryEntry UI} = New directoryInterior (userDn); UEntry.Properties ["LockOutTime"]. Value = 0; // Unlock AccountUntry Comet Change (); // do not need it but close it with adding it to the urinary. } Hold (System.DirectoryServices.DirectoryServicesCOMException E) {// DoSomethingWith -> E.Message.ToString (); }}
Comments
Post a Comment