-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Reji1009
Message 7 in Discussion
New Message on MumbaiUserGroup
Active Directory SetPassword Problem
Reply
Reply to Sender
Recommend
Message 4 in Discussion
From:
Reji1009
New Message on MumbaiUserGroup
Active Directory SetPassword Problem
Reply
Reply to Sender
Recommend
Message 3 in Discussion
From:
Reji1009
New Message on MumbaiUserGroup
Active Directory SetPassword Problem
Reply
Reply to Sender
Recommend
Message 1 in Discussion
From:
Reji1009
I am trying to create a new user in Active Directory
programatically, which I am able to do so. But finding trouble to set the
password. I am getting the following Exception : ex.Message >> Exception has
been thrown by the target of an invocation.
ex.InnerException.Message >> The network path was not found.
I am having admin priveledges too. Can anyone please tell me what is the
mistake I am making. Please find the Code below :
*********************************************************************
DirectoryEntry newUser = ent.Children.Add("CN="+txtName.Text, "user");
using (newUser) {
//now add properties as appropriate;
newUser.Properties["sAMAccountName"].Add(txtName.Text); // Set the SAM Account
Name.
//...Set the Other Properties
newUser.CommitChanges(); // Save the Changes.
newUser.Properties["userAccountControl"].Value = 0x200; // Activate User
newUser.CommitChanges(); // Save the Changes
newUser.Invoke("Put", new object[] {"userPrincipalName", "LogonName" }); // Set
the Logon Name.
newUser.CommitChanges(); // Save the Changes.
// User has to be saved prior to setting the Password. // Now Set the Password
newUser.Invoke("SetPassword", new object[] {"Password"} ); . << ERROR HERE
newUser.CommitChanges(); // Save the Changes.
*********************************************************************
View other groups in this category.
View other groups in this category.
View other groups in this category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]