c# - Unwilling server: Can't unlock AD account in code -


"postprint" itemprop = "text">

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.

  // "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 (); }   

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 dsa.msc < Using the / code> to unlock the account, everything works fine.

The error also occurs with different user objects, but both versions ( Clear and InvokeSet ) work in other environments. Can anyone give me a hint

PS:? I use the Domain Administrator credentials to access the LDAP server

Try:

  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

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -