Hi Tomasz ,
Thanks for response.......
 
following is a code sample that I am dealing with......
 
private void button1_Click(object sender, System.EventArgs e)
{
  DirectoryEntry de = new DirectoryEntry  ( "LDAP://groupware/dc=groupware,dc=com",
  "administrator", "[EMAIL PROTECTED]", AuthenticationTypes.Secure | AuthenticationTypes.Sealing );
try
{
DirectorySearcher deSearch = new DirectorySearcher();
deSearch.SearchRoot = de;
deSearch.Filter = "sAMAccountName=j.patel";
deSearch.SearchScope = SearchScope.Subtree;
deSearch.CacheResults = false;
SearchResult results = deSearch.FindOne();
if (!(results == null))
  {
   DirectoryEntry uEnt = results.GetDirectoryEntry();
   uEnt.Invoke("SetPassword", new Object[]{textBox1.Text});
  }
}
catch(Exception ex)
{
MessageBox.Show(ex.Message + Environment.NewLine + ex.InnerException.Message);
}
} //click event ends

//----------------------------------------------------------------------
 
 
I am getting an Exception Message :  "Exception has been thrown by the target of an invocation." 
and InnerException Message: "The format of the specified network name is invalid."
 
Can you figure out what's missing ?
 
Regards,
Jignesh

Tomasz Onyszko <[EMAIL PROTECTED]> wrote:
Jignesh Patel wrote:
> Hi,
>
> I am receiving *"The format of the specified Network Name is invalid"*
> Message of InnerException while setting new password of the newly
> created User in AD.
>
> Can anyone help me out for the above mentioned error ????
>

Maybe some code sample will be usefull here to see what are You doing
with Your code.

I think You can alseo consider posting this question to Carlos's ADSI
and DS group:
http://groups.yahoo.com/group/ADSIANDDirectoryServices/

--
Tomasz Onyszko
http://www.w2k.pl
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/


Enjoy this Diwali with Y! India Click here

Reply via email to