Copied to clipboard

Flag this post as spam?

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

  • frank-frank 22 posts 45 karma points
    Nov 16, 2010 @ 01:24

    password protected areas -- how to... step by step

    Hi guys,

    after reading thru tons of posts and googling it... can anybody give me an up-to-date step-by-step intro how to protect all my pages underneath a certain folder? I've read a lot of stuff but I am not sure for which version that was written and I don't want to go into legacy recipe's. Thanks.

    My web structure is simple:

    - page 1
    - folder A
    -- page
    - folder MEMBER-AREA
    -- some pages within that folder which shall be protected

    So, I know that I can set-up a member group and member type and also a specific person as a member. I don't need registraton of any kind.

    How do I set-up the simple Login page (uid, pw)? What has to go in the web.config? Is it all done with standard controls or how else?

    I appreciate an answer which covers the process from start to finish -- I believe it's very simple but all the posts and different versions they refer to make it kind of frustrating to solve this common task. Doing it in native .net is actually simpler because of the great .net videos, however, umbraco is a great platform but with definetly weak documentation.

    Hope somebody can lead me thryu the process for version 4.5+ ... thanks guys.



  • Sebastiaan Janssen 4988 posts 15101 karma points MVP admin hq
    Nov 16, 2010 @ 08:33
    Sebastiaan Janssen

    There's an excellent episode on this very subject, but you'd have to pay for it

    Basically it works like this:


    • In the members section of umbraco, create a new member type
    • In your web.config set the "defaultMemberTypeAlias" property to the alias of the membertype you created above
    • In the members section of umbraco, create a new member role
    • Create a usercontrol with the default CreateUserWizard control on it and use it as a macro in one of your templates
    • In the codebehind you want to add a member to a role in the CreateUserWizard1_CreatedUser event (for example: Roles.AddUserToRole(CreateUserWizard1.UserName, "BasicUsers");)
    • Then you can go into the content section of umbraco and set up "Public access", this allows you to assign which users roles have access to the content
    I think most (if not all) of the things you've read still apply in the current version of umbraco.
    It's important too remember that umbraco uses the default .net membership provider and in the latest version you're even encouraged to work with members with the .net api calls instead of the umbraco specific ones, but you don't have to.


  • frank-frank 22 posts 45 karma points
    Nov 16, 2010 @ 18:13

    Thanks Sebastiaan.

    I had found that procedure on the Internet but since the posting date was way back in time I wasn;t sure any more for which umbraco version that would apply.

    Thanks, I am now on track and implementation was really easy.


Please Sign in or register to post replies

Write your reply to: