Call to DirectoryEntry.Invoke("SetPassword", new object[] {password} ) failing



Hi,

After creating a new user and committing, I am attempting to set the
password.
I create 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});

I receive this error:

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. If I connect to a local server
I do not have this problem. I am using the default connection
AuthenticationTypes.
(should I be using something different than the default?)

i.e. 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

Thanks for any tips.

Frank


.



Relevant Pages

  • Re: Datadirect JDBC driver on DB2: Locks not released
    ... Are you getting this connection from a managed pool or are you getting ... > (even though Autocommit is ON). ... > committing) has quite wide impact on the system and is going to cost ...
    (comp.lang.java.databases)
  • Re: Rollback not working
    ... Do you have any surety that your ... method always returns the same connection to you, ... you are committing every time through the loop. ... Joe Weinstein at BEA Systems. ...
    (comp.lang.java.databases)