I am creating a WCF service that uses an asp.net SQL membership provider to authenticate users. I know that the users can be authenticated with no problems but what about if I wanted to allow users to sign up or change their passwords? Would I be able to access the methods to that provide that functionality of the membership provider?
Asked
Active
Viewed 291 times
0
-
possible duplicate of [How do you change a hashed password using asp.net membership provider if you don't know the current password?](http://stackoverflow.com/questions/287320/how-do-you-change-a-hashed-password-using-asp-net-membership-provider-if-you-don) – Jeremy Thompson Mar 21 '13 at 02:22
1 Answers
1
Yes you can you just have to make sure that you set up the config file to allow that. Then just create your methods to do what you need. Web.config setup for membership
public string ChangePassword(string NewPassword)
{
MembershipUser u = Membership.GetUser();
if (u.ChangePassword(u.ResetPassword(), NewPassword))
{
return "Password changed.";
}
}

Brandon.Staley
- 1,742
- 21
- 25