Copied to clipboard

Flag this post as spam?

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


  • Jason Rhodes 10 posts 29 karma points
    Dec 01, 2009 @ 19:02
    Jason Rhodes
    0

    Password Protect Entire Site with Umbraco 4.2.1

    Hello,

    I've scoured the web trying to resolve this issue however I am lost as how to get this done.  I want to password protect an entire website.  Basically when you type in the URL you are greeted by a login page and you must enter a password to contiune.  Not hard.  However every time I try to do this via an Umbraco tutorial (pre version 4) or by trying to do it via writing my own ASP login page, I cannot seem to get it to work.  Either I get an error page generated by the server or there is no login prompt and I end up seeing the website without a password. 

    Umbraco is version 4.2.1

    ASP is 3.5

    Server is Windows Server 2008 running iis 7

    If you could just point me to the right tutorial thats all I really need.  everything I find via google is for version 2 and I can't seem to find any documentation on how to do this with version 4.  Any and all help would be awesome! 

    Thanks!

  • Jason Rhodes 10 posts 29 karma points
    Dec 01, 2009 @ 19:05
    Jason Rhodes
    0

    I forgot to add, the tutorial I found was using the Member controls package however I have come to find out that is not needed with Umbraco 4.  Is this correct?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 01, 2009 @ 20:01
    Dirk De Grave
    1

    Jason,

    if you're using v4, consider using the standard plain old asp.net login controls. Can be integrated anywhere in your templates, just need to tell umbraco to protect your pages (probably the root node in your case), select member groups that have access to the site, select a login and error page and you're set. If you need a hand to set this up, just shout and we'll work it out together.

    A nice starter tutorial can be found here,

    Cheers,

    /Dirk

  • Jason Rhodes 10 posts 29 karma points
    Dec 02, 2009 @ 21:00
    Jason Rhodes
    0

    Dirk,

    Thanks for the tutorial.  I get about half way but run into a problem with the Document types and how to setup the membership area  and login page.  Can you help me through this?  I got to the point where the tutorial starts to create content however I know I need to assign a doc type to the new signup page I created but I don't know what the gen. properties should be set at. 

    (Note: I really don't need a signup page just a login page as the login information is already set and handed out verbally to users of the site, so no one needs to sign up but I might as well learn how since I am here right!?)

    Please Advise,

    -Jason

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 02, 2009 @ 22:03
    Dirk De Grave
    0

    Ok, 2nd try to post a reply (and let's hope I don't close this browser window before hitting submit)

    I'll simplify things and provide a simple list to get you up and running pretty fast:

    - Create a 'Page' document type (no properties required yet) and corresponding 'Page' template (may inherit from a master template)

    - Create a 'Login' template (probably also inheriting from the master template)

    - Allow 'Login' template for a Page document as well ('Allowed templates' on 'Page' document type)

    - On your 'Login' template, add following snippet (in placeholder if using master templates, otherwise not required)

    <asp:Login ID="Login1" runat="server" />

    - Create three pages (of type 'Page') in the content section. A first page you'll protect (template = 'Page'), a second page for login (select 'Login' template) and a third that will serve as the error page (template = 'Page')

    - Protect your first page using the built-in Public Access system. Assign member groups with access to this page, set login and error page as well.

    - Browse to your page and you should get redirected to the login page. Try logging in using a member with/without the required role.

     

    Should do it. Let me know if still having issues.

     

    Cheers,

    /Dirk

     

  • Dan 1288 posts 3921 karma points c-trib
    Dec 02, 2009 @ 22:19
    Dan
    0

    Can you set up password protected directories through your website hosting control panel?  I usually find that's the simplest way for instant full-site protection (e.g if it's a demo website etc).

  • Jason Rhodes 10 posts 29 karma points
    Dec 02, 2009 @ 22:41
    Jason Rhodes
    0

    Dan,

    That's what I originally had setup but the client wants the password protection to come from the page, not a popup window and didn't want a username, just password. 

    Dirk,

    Thanks! I'll give that a shot.  Might be a few days before I report back (leaving on vacation) but I'll look into it.  In the intrim I wrote a simple VB script that calls to a text file that holds the passwords and if successful then the user is handed the umbraco default.aspx file.  Not fullproof but the client is happy, for now. 

    -Jason

  • Jason Rhodes 10 posts 29 karma points
    Nov 10, 2010 @ 17:52
    Jason Rhodes
    0

    Is it too late to revisit this!?  =P  

    My only problem Dirk is that when I go to create the login page, I cannot select the login template.  I did as you said and Allowed the login template via the page doc type but I can't see or select it when creating the page in the content section.  I can create a login doc type but I get an ASP error when I try to setup the public access rules.  

Please Sign in or register to post replies

Write your reply to:

Draft