473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Exception has been thrown by the target of an invocation

I am getting the exception when i invoke the
Password,
Exception is

"Exception has been thrown by the target of an invocation."

DirectoryEntry ent = new DirectoryEntry
("LDAP://server01:389/DC=chm,DC=com","abc","test");

DirectoryEntry oue = ent.Children.Find("OU=test");
DirectoryEntry Objusr = oue.Children.Add("CN="+ username,"user");
Objusr.Properties["samAccountName"].Value = username;
Objusr.Properties["givenName"].Value = Fstname;
Objusr.Properties["sn"].Value = Lstname;
Objusr.Properties["userPrincipalName"].Value = username;

Objusr.Properties["mail"].Value = email;
Objusr.CommitChanges();

Objusr.Invoke("SetPassword","test");
Objusr.CommitChanges();

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #1
1 4764
pls Any one help me

by
raj

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other...
3
by: Minh | last post by:
I create a C# Project using Windows Application template, I add an imagelist to Form, and add icon to imagelist1. After that, I run Project, but an Exception has occured. I can fix it even...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
0
by: Val | last post by:
From: "Val Mazur" <group51a@hotmail.com> Subject: Exception has been thrown by the target of an invocation Date: Monday, June 06, 2005 2:01 PM Hi guys, For some reason when application tries...
2
by: darrel | last post by:
I've written a function that will upload a file. This sort of works. It works sometimes, and then other times...namely when it tries to write to an existing directory (but not always), I get this...
0
by: Kivak Wolf | last post by:
Yet another problem, I'm finding a few problems... This is yet another one. All i am trying to do is create 2 sql data source objects and connect them to the same data table with the same...
2
by: Eugene | last post by:
Hi, I have a problem when loading one of my dll. I have a main class that would load a winform in another dll using reflection. When I load it using Assembly.CreateInstance(DLLName.DLLFormName), an...
2
by: Monty | last post by:
I have a GridView in an update panel, and the GridView has an ObjectDataSource. Under certain conditions the Object that is the ObjectDataSource will throw an exception with a specific error...
2
by: Academia | last post by:
I find the following warning in my Error List: Warning 1 Exception has been thrown by the target of an invocation. 0 0 This is a solution with 41 projects and I have no idea which one is...
1
by: Curious | last post by:
Hi, I get the error, "Exception has been thrown by the target of an invocation", at the last line of code. Any idea why this happens and how to get it fixed? Type mySFunction =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.