Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Asif Malik 203 posts 339 karma points
    Feb 05, 2013 @ 16:13
    Asif Malik

    Problem with member password

    Hi for some reason I am having problems with creating a password for a member. I am programmatically creating a member however the password that gets entered does not work. I can change the password via the back office, and works fine. Additionally I have a forgotten password form which also works. I am a bit confused because all of these use the Membership to create things.

    My provider in the web.config is

    <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Basic" umbracoLockPropertyTypeAlias="isLocked" passwordFormat="Hashed" />

    I have some code which creates the member I have triple checked to make sure the correct password is coming through here (and it is) 

    MembershipCreateStatus status = new MembershipCreateStatus();
    Membership.CreateUser(entity.Email, entity.Password, entity.Email, nullnullfalseout status);

    On login I am using the standard validate function

    Membership.ValidateUser(email, password)

    The reset password is straight forward as well

    MembershipUser mem = Membership.GetUser(email, false);
    newPassword = mem.ResetPassword();


    What is additionally strange is that my create member method then goes and connect to the built in Umbraco web service API for members and I can successfully get the memberCarrier for the just created member.

    memberServiceSoapClient _memberService = new memberServiceSoapClient();
    memberCarrier _memberCarrier = _memberService.readByLogin(entity.Email, entity.Password, UmbUsername, UmbPassword);


    I have taken a look in the database and when i update the password it does change the hashed password stored in the database (even though i am using the same password)

    So from what I can see the hashed password seems to be different, I just don’t understand why as all should be using the same underlying membership

    Has anyone else experienced this? or something similar, any help you be greatly appreciated.


    PS this is running on Umbraco 4.11.3, IIS7.5, Windows 2008R2 and MSSQL2008R2 with 4



  • Wing 17 posts 39 karma points
    May 30, 2014 @ 14:35

    I have the same problem in U7

    var member = memberService.CreateWithIdentity(vm.Username, vm.Email, vm.Password, "Member");

    rawPasswordValue = the selected password.

    But the user is not able to login...

Please Sign in or register to post replies

Write your reply to: