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

Forums / Developing with Sitefinity / Creating a members only area

Creating a members only area

4 posts, 0 answered
  1. Steven Lancaster
    Steven Lancaster avatar
    82 posts
    Registered:
    06 Nov 2009
    11 Feb 2010
    Link to this post
    I am wanting to create a Members only are:

    The first thing I need to do is create a page that someone can got to and sign up to be a member.

    The second thing I need to do is verify and store the username and password that they setup.

    Then I need to protect the pages so only the users that are setup can access it


    Is there a Knowledgebase article or documentation on best practices for this?


    -Steven
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Feb 2010
    Link to this post
    Hi Steven Lancaster,

    The first thing I need to do is create a page that someone can got to and sign up to be a member.

    Crate a page with ASP.NET Login control on it.

    The second thing I need to do is verify and store the username and password that they setup.


    In the code behind of your Login control you can get the username and password that the verified user has supplied.

    void Login1_Authenticate(object sender, AuthenticateEventArgs e)
        {
            e.Authenticated = UserManager.Default.ValidateUser(this.Login1.UserName, this.Login1.Password);
         
            if (e.Authenticated)
            {
               // here you can get the username and the password that have been entered
               string loggedInUser = ((TextBox)Login1.FindControl("UserName")).Text;
               string loggedInPassword = ((TextBox)Login1.FindControl("UserPassword")).Text;
            }
        }

    Then I need to protect the pages so only the users that are setup can access it

    You can control this from backend UI - for each role you can set permissions. Programmatically you can get a page which permissions you want to modify according to the user. In this case you will experience preformance issues.

    Sincerely yours,
    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. Steven Lancaster
    Steven Lancaster avatar
    82 posts
    Registered:
    06 Nov 2009
    11 Feb 2010
    Link to this post
    Is there anything special needed in the web.config?

    And also can I have sitefinity control my users and what permissions they have such as: a user signs up to be a member but I do not want them to be or I need to delete them or take away there login privilege?


    -Steven
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Feb 2010
    Link to this post
    Hello Steven Lancaster,

    There is nothing special in the web.config that you should set. We use ASP.NET Membership, Role and Profile provider. Each module in Sitefinity and Pages section has Permissions view from where you can control users' rights.

    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.
Register for webinar
4 posts, 0 answered