473,395 Members | 1,763 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,395 software developers and data experts.

How to create new user in ADAM using ASP .Net 2.0 / C#.

I am trying to create user account in ADAM using ASP .Net 2.0 / C#. but giving an exception on "setpassword" property.

The code is as follows: :

user.Invoke("SetPassword", new object[] { "1234qwer!@#$" });

The given exception is

System.Reflection.TargetInvocationException was unhandled by user code
Message="Exception has been thrown by the target of an invocation."
Source="System.DirectoryServices"
StackTrace:
at System.DirectoryServices.DirectoryEntry.Invoke(Str ing methodName, Object[] args)
at _Default.Button1_Click(Object sender, EventArgs e) in d:\ESF\CS\adam\Default.aspx.cs:line 49
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

thank you in advance
Apr 9 '08 #1
0 1103

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Adam Nowotny | last post by:
I've created library with some "user controls" and they all showed up in the toolbox, so it is easy to drag them to a form in Forms Designer. Now we want to use the controls in our main project...
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...
7
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
4
by: Stephen Adam | last post by:
Hi there, I am working on a project were a user can update a SQL Server DB via a web form. I've included a number of text boxes for a user to enter in strings. The text from these boxes is then...
0
by: richb330 | last post by:
Hi, I have code from the msdn to crate a user in an AD domain. I have set the code and changed the necessary parameters for the ldap queries but was wondering how i can execute this code on a...
1
by: richb330 | last post by:
I'm trying to set up a program that will create a user account within active directory based on a number of parameters selected on a form. The following code should, i believe, create a user...
4
by: Adam - Regus | last post by:
I'm trying to create a button that prints 2 copies of a form. Using the wizard, I created a button that prints one automatically, using the following code: End Sub Private Sub...
9
by: webrod | last post by:
Hi all, how can I check a user/password in a LDAP ? I don't want to connect with this user, I would like to connect to LDAP with a ADMIN_LOG/ADMIN_PWD, then do a query to find the user and...
4
by: Adam Clauss | last post by:
I have a completely user-drawn user control in which I enabled transparency (follownig suggestions at...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.