?
=?ISO-8859-1?Q?Yannick_B=E9ot?=
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(String 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.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Do you have any idea?
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(String 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.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Do you have any idea?