473,473 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reset Password.....

Hi All,

I am trying to change the password of a user in Active
Directory. I tried using

object[] oPassword = new object[] {"<oldPassword>","<newPassword>"};
userEntry.Invoke("ChangePassword",oPassword);

when i tried this i am getting error "InteropServices.COMException'.
Hence i tried using

object[] oPassword = new object[] {"<newPassword>"};
userEntry.Invoke("ChangePassword",oPassword);

This works fine and the password gets changed.Then i tried login with
the old password and new password both passwords works. I need the user
should use the new password to login can any pz help me to solve this
problem.

Thanks
Balaji Krishnamoorthy

Nov 17 '05 #1
2 2720

"Balaji" <Ba**********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi All,

I am trying to change the password of a user in Active
Directory. I tried using

object[] oPassword = new object[] {"<oldPassword>","<newPassword>"};
userEntry.Invoke("ChangePassword",oPassword);

when i tried this i am getting error "InteropServices.COMException'.
Hence i tried using

object[] oPassword = new object[] {"<newPassword>"};
userEntry.Invoke("ChangePassword",oPassword);

This works fine and the password gets changed.Then i tried login with
the old password and new password both passwords works. I need the user
should use the new password to login can any pz help me to solve this
problem.

If this is true, Microsoft is in big trouble :-)

The second code snip can't run, it should throw an TargetInvocationException
with an "invalid number of arguments" inner exception.

The first code snip is correct, what is the complete exception message!

Willy.


Nov 17 '05 #2

"Balaji" <Ba**********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi All,

I am trying to change the password of a user in Active
Directory. I tried using

object[] oPassword = new object[] {"<oldPassword>","<newPassword>"};
userEntry.Invoke("ChangePassword",oPassword);

when i tried this i am getting error "InteropServices.COMException'.
Hence i tried using

object[] oPassword = new object[] {"<newPassword>"};
userEntry.Invoke("ChangePassword",oPassword);

This works fine and the password gets changed.Then i tried login with
the old password and new password both passwords works. I need the user
should use the new password to login can any pz help me to solve this
problem.

If this is true, Microsoft is in big trouble :-)

The second code snip can't run, it should throw an TargetInvocationException
with an "invalid number of arguments" inner exception.

The first code snip is correct, what is the complete exception message!

Willy.


Nov 17 '05 #3

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

Similar topics

3
by: Ian | last post by:
Hi I know there are products out there that can do this like http://www.psynch.com/technology/ska.html What is the code that is used to Reset a Users password so the next time they logon to...
0
by: John Gossett | last post by:
I have written an application in vb.net to reset user passwords in active directory. If I run the application as a user with full contol of the AD object I can reset the password. If I run the...
0
by: serkan | last post by:
Guys, I am trying to get this password reset functionality wor for me but I am not successful at all. Please somebody help me. I get "Your password could not be reset - please try again later" so I...
0
by: damontimm | last post by:
My setup: Mac OS 10.4.4; mysql 4.x ... everything was installed and working fine for some time. Today, I added drupal to my system and had to create a new database in mysql -- now I am having some...
1
by: Dabbler | last post by:
My password reset emails aren't getting through so I have two problems, getting the email to work and resetting the passwords from users who have already missed their reset email. My health...
3
by: john_c | last post by:
Using asp.net Membership, is there a way to detect a password reset so that next time the user logs in, you can send them to the password change page? Thanks.
6
by: jarice1978 | last post by:
Hello, I have been scanning the internet for a few days now. That is not working. So now it is time to post! I have read a few other posts on here about authentication but they do not match...
2
by: Homer | last post by:
Hi, I want to be able to reset a user's password and I do not want to use the PasswordRecovery control to reset and email it to the user. A while back, I thought I'd read an article that...
2
by: DarthPeePee | last post by:
Hello everyone. I am working on a Password Strength Meter and I am running into 1 problem that I would like to fix. When pressing the "Clear Password & Try Again" button, the password clears...
7
by: hotflash | last post by:
Hi All, I want to creat a script where I will allow user to reset their own password. I have tried different options but don't have any luck. Wonder what I want to do is kinda not valid or not. ...
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
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...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.