473,569 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change user password in a .NET application

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, AuthenticationT ypes.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://mydomaincontrol ler/CN=...,cn=users ,DC=superheros, DC=com"
I have got an exception :

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

[TargetInvocatio nException: Une exception a été levée par la cible d'un
appel.]
System.RuntimeT ype.InvokeDispM ethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
Int32 culture, String[] namedParameters ) +0
System.RuntimeT ype.InvokeMembe r(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifi er[] modifiers, CultureInfo culture, String[]
namedParameters ) +473
System.Type.Inv okeMember(Strin g name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args) +29
System.Director yServices.Direc toryEntry.Invok e(String methodName,
Object[] args) +107
clarins.u1_1.Bu tton1_Click(Obj ect sender, EventArgs e) +108
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1277

Do you have any idea?
Nov 19 '05 #1
0 1540

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

Similar topics

0
1253
by: Sylvain Audet | last post by:
Hi there! We are experiencing a very strange problem with our VB.NET application. The application is using .NET Framework v1.1.4322 and the problem is experienced only by Windows XP users. When our application starts, it retrieves all required core assemblies from a network path \\SERVER\DIRECTORY\ and copy them locally using standard...
10
9845
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
2
2280
by: Rod | last post by:
I have a requirement in which I need to allow the user to log into our ASP.NET application, but also be able to change their Windows password, if it is expired. I had thought that Windows authentication would do the trick, but it appears not to. (If the user's password has expired, it will sit there forever asking the user for their username...
6
2068
by: Evgeny Zoldin | last post by:
Hi ALL. I have the configuration: 1. WinXP PRO with MS IIS 5.0 and installed ASP.NET 2. ASP.NET application A configured to authenticate only users from local Users group. I would like to de the following: Logged on user is able through ASP.NET-Pages to change its own Logon Username, Password and Full Name
0
3663
by: GregS | last post by:
We have a client that has a very large number of users that will be connecting back to the domain via VPN only. The problem is that the communications vendor can not pass the password expiration notice back to the client. What we would like to do is run a script or application after the vpn tunnel is established that checks the number of days...
6
5137
by: Jan | last post by:
Hi: I have created a secured database for a client. For various reasons, I don't want the client to have full persmissions for the database; they aren't in the admins group. I have instead tried to create a second group, called "localAdmin," for the admin-type person at the client. I want this group to be able to do some basic admin-type...
2
4481
by: J | last post by:
Hello. I apologize if this isn't the appropriate group for this question but I was wondering if it's possible to allow regular windows domain users to change their passwords through an .asp page? I'm trying to figure out the best way to handle domain users to log into an .asp application tied with SQL Server 2000 on the back end since I keep...
3
4176
by: Xnet | last post by:
I need to change password of a local user of a W2003, without Active Directory. I need to do it from an application created with VB2005. Thanks!
1
6048
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while during the runtime, the user can click on a button and change the connection string without exiting the application. I would really appreciate...
2
1539
by: spncc | last post by:
i'm making Form authenticate page to let the user first logon before using the application. However, like most security manner, the new user is needed to first logon and forced to change password before using the application. My problem is - When the user passed the authentication at logon page, we need to redirect them to change thier...
0
7701
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7979
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.