After making a new user and committing I am trying to set the password. I have created the user as:
DirectoryEntry newUser = adUserFolder.Children.Add("CN=" + userInfo.username, "User");
// fill out properties, then commit
Then when calling newUser.Invoke("SetPassword", new object[] {strPassword});
But I am getting the below error message:
InnerException = {"The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B)":null}
I am connecting to a remote LDAP AD server. When I am connecting to a local server I dont have this issue. I use the default connection AuthenticationTypes. So, is there something different that I have to use than the default, which is my connection:
DirectoryEntry adUserFolder = new DirectoryEntry(strADServerUrl, strADusername, strADpassword);
the strADServerURL looks like this: LDAP://1.2.3.4:389/CN=Users,DC=mywebsite,DC=net
Thank you
Bookmarks