More in this section

Forums / General Discussions / user cant login

user cant login

3 posts, 1 answered
  1. vinamra
    vinamra avatar
    45 posts
    23 Oct 2012
    08 Jun 2010
    Link to this post

    in my website there is strange problem

    i create a user by Membership.CreateUser  and generating random password by Membership.GeneratePassword(7, 0)

    now when user logs in  login fails.
    now if go to admin and reset the password and then  user log in from that password user can log in successfully.

    what could be the problem.

    in web.config
    <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/>

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    09 Jun 2010
    Link to this post
    Hello vinamra,

    Could you try to use the code below to create a user and access the backend.

    // generate password
        string password = Membership.GeneratePassword(7, 0);
        //create a new user
        MembershipUser user = Membership.CreateUser("customUser1", password, "");
        // update the user
        // add user to a role. Note that you should have already create this role. The role should have CmsAccess allowed
        Roles.AddUserToRole(user.UserName, "test");

    I am not able to reproduce issues with this code.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. vinamra
    vinamra avatar
    45 posts
    23 Oct 2012
    09 Jun 2010
    Link to this post

    sorry i was doing some thing wrong.  i found my mistake. and corrected it.

Register for webinar
3 posts, 1 answered