allow users to change local account passwords

Discussion in 'ASP .Net' started by Guest, Nov 5, 2003.

  1. Guest

    Guest Guest

    Looking for a way for users to change their passwords on
    local accounts. I followed this KB article, 306271, and
    it worked as far as adding a new user. I tried to modify
    it to do password changes:
    Changed this:
    Dim NewUser As DirectoryEntry = AD.Children.Add
    ("TestUser1", "user")
    To this:
    Dim NewUser As DirectoryEntry = AD.Children.Find
    ("TestUser1", "user")

    Changed this:
    NewUser.Invoke("SetPassword", New Object() {"123456"})
    To this:
    NewUser.Invoke("ChangePassword", New Object()
    {"123456", "654321"})

    The error I get is:
    'Exception has been thrown by the target of an invocation'

    Any ideas on how to use the changepassword method in this
    situation?
    Thanks for any advice,
    RB
     
    Guest, Nov 5, 2003
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.