Click
here to login or sign-up
Very quick snippet that I just made use of to allow users to remotely change passwords over the web. Just leave the domainname and username black to change the current users password. This works great from ASP.NET and requires no special permissions, unlike some solutions that use LDAP or impersonation.
[DllImport("netapi32.dll", CharSet = CharSet.Unicode,
CallingConvention = CallingConvention.StdCall, SetLastError = true)]
static extern uint NetUserChangePassword(string domainname,
string username, string oldpassword, string newpassword);
Permalink 0 Comments Digg This!
CommentsYou must be logged in to post comments. Click here to login or signup.
Server:
echo - Your IP:
38.107.191.83 -
Copyright © 2010
Simon Soanes