Error in Changing Password using DirectoryEntry.Invoke

Last post 06-25-2009 7:46 AM by jonespatrick. 2 replies.

Sort Posts:

  • Error in Changing Password using DirectoryEntry.Invoke

    10-13-2008, 3:43 AM
    • Member
      point Member
    • ssshan
    • Member since 10-13-2008, 7:33 AM
    • Posts 1

    Hi

     I am facing an error while changing/Setting the password.

    I am getting the below error

     Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))” . 

     

     DirectoryEntry usr = new DirectoryEntry("LDAP://server.domain.com");

    usr.Invoke("ChangePassword", new object[] { "oldpwd", "new" });

    Its throwing error while calling the invoke method.

    Thanks and Regards,

    Shah

     

  • Re: Error in Changing Password using DirectoryEntry.Invoke

    10-16-2008, 11:30 AM
    • Participant
      1,959 point Participant
    • raghu1
    • Member since 10-28-2005, 3:50 PM
    • Posts 471

     This works for me:

                DirectoryEntry usr = new DirectoryEntry();
                usr.Path = path; // PAth of the account to update the Path
                usr.Username=UID; // This account needs to have update rights
                usr.Password=PWD; // Password of the above account
                usr.AuthenticationType = AuthenticationTypes.Secure;
                object[] password = new object[] {p};
                object ret = usr.Invoke("SetPassword", password );
                usr.CommitChanges();
                usr.Close();
     

  • Re: Error in Changing Password using DirectoryEntry.Invoke

    06-25-2009, 7:46 AM
    • Member
      2 point Member
    • jonespatrick
    • Member since 06-25-2009, 7:44 AM
    • Posts 1

    While changing the password, I am getting the following error.

    Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))

    Kindly tell me a solution

Page 1 of 1 (3 items)