(PS> Sorry if this sounds like double publish but my firstpost in some way got a mistake throughout submission and becoming very little sights. I'll repost here.)

I'm getting a little of puzzling problem where basically make an advertisement change using DirectoryServices in Domain A, it's amazing fast. However, basically possess the application located on Domain B computer and check out altering Domain A AD things, it provides me with a substantial delay (50seconds) per invoke.

The code is really as following:

DirectoryEntry userDe = GetUser(path.Trim(), user.Cn);
userDe.Username = svcDomainUser;
userDe.Password = svcPassword;

if (Convert.ToBoolean(userDe.InvokeGet("IsAccountLocked")))
   userDe.InvokeSet("IsAccountLocked", false);

userDe.Invoke("SetPassword", new object[] { tempPass });



Fun details:

  • The above mentioned code is located on Domain B, however the user object is within Domain A

  • Domain B is child of Domain A

  • The code runs effectively when code located on Domain A and Domain B. However, there's a lengthy delay for every Invoke when located on Domain B. Domain A is very fast.

  • Attempted hosting on other Domain A servers and Domain B servers however the answers are just like above.

Could someone assist me to please? Thanks!