G
Guest
OK, I have code that I used in a standard windows app
that would create an account and then set the password.
I have taken that code and am using it in a Web App.
Here's the code:
user.CommitChanges();
user.Properties["userAccountControl"].Value = 0x200; //Normal user
user.Invoke("SetPassword", new object[] {szPassword});
//szPassword is a randomly generated complex password.
user.CommitChanges();
The code errors out on the user.Invoke line with an error of "The network
path was not found". Since I just created the account in AD and have
verified
that the account is there, I don't get why I am getting that error.
If anyone has any thoughts they would be appreciated.
that would create an account and then set the password.
I have taken that code and am using it in a Web App.
Here's the code:
user.CommitChanges();
user.Properties["userAccountControl"].Value = 0x200; //Normal user
user.Invoke("SetPassword", new object[] {szPassword});
//szPassword is a randomly generated complex password.
user.CommitChanges();
The code errors out on the user.Invoke line with an error of "The network
path was not found". Since I just created the account in AD and have
verified
that the account is there, I don't get why I am getting that error.
If anyone has any thoughts they would be appreciated.