+1-888-365-2779
Try Now
More in this section

Forums / Security / Admin password reset

Admin password reset

5 posts, 0 answered
  1. El Barto
    El Barto avatar
    42 posts
    Registered:
    28 Apr 2008
    21 Dec 2009
    Link to this post
    I'm obviously missing something here.
    I'm working on a site on my local machine. The site has just one user in it. This user has admin rights. I tried to logon with the username and password and I was pretty sure the correct ones, but I couldn't login. I thought it must be a typo or I just forgot the password.
    So I searched how to reset the password and followed the instructions I found here: http://www.sitefinity.com/help/developer-manual/resetting-administrator-password.html 
    I tried them both but I still can't login.
    I looked into the table telerik_Users and I noticed the # of failed password attempts does not increase. I put a trace on the database and tried to login. The trace showed me the following procedure is called:
    exec telerik_GetUserByName @P_UserName=N'',@P_Application='1ABC2CE9-B951-442B-A148-9349B964799D'
    The wierd thing is the username parameter is empty. How come? When I put an extra line in this SP wich sets the parameter to the username first, I still can not login but the failed password attempt number increases now.

    Just before I installed windows 7 on my workstation, I installed sitefinity on Vista. I think I had the same issue back then as well. So obviously I mess up the installation one way or another, but I can't think of anything that might cause this behaviour.

    I use version 3.7 on windows 7.

    Bart
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Dec 2009
    Link to this post
    Hi El Barto,

    Do you get any errors when you try to log in? You can check whether roleManager is enabled in your web.config file and also check whether you have the following modules in server applicationHost.config file

    <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" preCondition="managedHandler" />
    <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="managedHandler" /> 
    <add name="RoleManager" type="System.Web.Security.RoleManagerModule" preCondition="managedHandler" />

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. El Barto
    El Barto avatar
    42 posts
    Registered:
    28 Apr 2008
    23 Dec 2009
    Link to this post
    Hi,

    The only error I get is the failed login attempt error on the login.aspx page.
    I checked the web.config and the roleManager is enabled. I also checked the applicationHost.config file and the lines specified are there.
    When I created this site everyting worked I was logged in as an admin and everything worked fine. But now I have to login again and I can't get in.
    What else can I check to solve this problem?
    Where could I search to find out why the username parameter is empty when the telerik_GetUserByName storedprocedure is called? It's the only activity in the database during login and if this parameter is empty it sure won't work.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Dec 2009
    Link to this post
    Hi El Barto,

    Can you try to install a new project and see whether you will reproduce the same problem? Can you try to add the following code in a page ( it could be external - located in the project root) and create a new administrative user then use it to access the backend?

    <asp:Button runat="server" id="button1" Text="CreateUser" />

    public void Page_Load(object sender, EventArgs e)
      {
          this.button1.Click += new EventHandler(button1_Click);
      }
     
      void button1_Click(object sender, EventArgs e)
      {
          MembershipUser user = new Telerik.Security.UserManager().CreateUser("user2", "user2");
          string roleName = "administrators";
          Roles.AddUserToRole("user2", roleName);
      }


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. El Barto
    El Barto avatar
    42 posts
    Registered:
    28 Apr 2008
    30 Dec 2009
    Link to this post
    I finally found the answer. A new project indeed functioned normally. So I reverted all changes back to when the project was created. I tried to login and this worked so the database was OK. Then I searched for all the files which where different and tried to make the changes first to the suspected files like web.config. Soon I came across the BrowserFile.browser and found that my changes in it would break the login control. The changes I made are according to the CSS Friendly Control Adapters. I tried to debug the issue and found the UserName property of the login control is empty when its called on line 29 of Sitefinity/Login.aspx.cs. For the moment I do not have the time to find out what is causing this. In my opinion this is a bug in the control adapter.
Register for webinar
5 posts, 0 answered