Changing a user's windows password
From: Jackie_ol (jackie_ol_at_hotmail.com)
Date: 07/02/03
- Next message: Matjaz Ladava: "Re: Problems with Forms Auth and Session State."
- Previous message: Rasmus Foged: "Regarding Windows authentication - LDAP vs. WinNT"
- Next in thread: G.V.: "Re: Changing a user's windows password"
- Reply: G.V.: "Re: Changing a user's windows password"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 2 Jul 2003 02:24:30 -0700
Hi!
I used the following code to change a user's windows
password:
DirectoryEntry myDirectoryEntry;
string dirEntry = string.Format(@"WinNT://{0}/
{1},User", "COMPUTER_NAME", "cyberuser");
myDirectoryEntry = new DirectoryEntry(dirEntry);
myDirectoryEntry.Invoke("setPassword", "abcde");
myDirectoryEntry.CommitChanges();
This code works fine when I run it as a console
application. But when I run this code in a web service
method, the password doesn't change. I don't receive an
error or an exception, but the password remains the same.
Any solutions?
Thanks in advance.
- Next message: Matjaz Ladava: "Re: Problems with Forms Auth and Session State."
- Previous message: Rasmus Foged: "Regarding Windows authentication - LDAP vs. WinNT"
- Next in thread: G.V.: "Re: Changing a user's windows password"
- Reply: G.V.: "Re: Changing a user's windows password"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|