Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to change user password in a .NET application

Reply
Thread Tools

How to change user password in a .NET application

 
 
=?ISO-8859-1?Q?Yannick_B=E9ot?=
Guest
Posts: n/a
 
      06-16-2005
Hi,

I'm trying to make an application that allow a user, through a web form
to change its password

On a click event, here is the code

DirectoryEntry usr = new DirectoryEntry(
theUserDN,
user,
password, AuthenticationTypes.Secure);
usr.Invoke(
"ChangePassword",
new object[]{password, newpassword} );

where password is the current user password
newpassword... the new password
user, the login
theUserDn, something like
"LDAP://mydomaincontroller/CN=...,cn=users,DC=superheros,DC=com"


I have got an exception :

[COMException (0x8007202f): Une violation de contrainte s'est produite.]

[TargetInvocationException: Une exception a été levée par la cible d'un
appel.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters) +473
System.Type.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args) +29
System.DirectoryServices.DirectoryEntry.Invoke(Str ing methodName,
Object[] args) +107
clarins.u1_1.Button1_Click(Object sender, EventArgs e) +108
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277



Do you have any idea?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 1 01-16-2009 02:56 PM
Changing a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 2 01-16-2009 02:08 PM
How can Administrator change the Password of existing User, without knowing his Old Password in Administer Security Tool ? Luqman ASP .Net 5 07-12-2007 09:29 AM
Hi I have one web application and i want to get the number of users who are currently accessing the application. Also I want to get the user details of each user, which is stored in a database. How can I do this? Pls help. Getting No: and anu Java 11 05-12-2005 03:25 PM
Password change not working for default password in cisco aironet 1200 Deepak K Cisco 2 04-19-2005 08:42 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57