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

Forums / Developing with Sitefinity / Password Protect Site

Password Protect Site

6 posts, 0 answered
  1. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    24 Jul 2012
    Link to this post
    Hi,

    I am trying to password protect a Sitefinity site in IIS 7.5 but am not having any luck.

    The first thing I tried was turning off Anonymous access in IIS under Authentication and that works for most of the site except when I go into ~/sitefinity/pages and I get an error that says Anonymous access must be turned on (see screenshot)...

    Any other things I can try to make this work?  Or other ways of making the entire site/domain password protected?

    Ben
  2. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    29 Aug 2012
    Link to this post
    Any news on this?  It's been over a month
  3. David Pearson
    David Pearson avatar
    54 posts
    Registered:
    17 Jul 2012
    29 Aug 2012
    Link to this post
    Hi Ben,

      In Sitefinity 3.7,  I use the method presented by Gabe Summer, where you use the IHttpModule to limit the filepath by IP address. http://www.sitefinitywatch.com/blog/10-03-04/How_to_secure_Sitefinity_rsquo_s_Administrative_UI.aspx   I believe you can do the same with Sitefinity 4 and 5.    As soon as I get done with my current project I will see if this will work in a web app Sitefinity 5.1..   I like limiting access to the back end also.

    Hopefully this info will be helpful
    David Pearson
  4. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    30 Aug 2012
    Link to this post
    Hi David,

    Thanks for the reply!

    Well everything is VERY different in 5.1 so I would NOT expect your way to just work but definitely keep me posted.

    Thanks!

    Ben
  5. Basem
    Basem avatar
    131 posts
    Registered:
    22 Dec 2010
    15 May 2013
    Link to this post
    What I had to do in Sitefnity 4.x was something wacky like create a widget that redirects if not authenticated and place it in the "master" page template.

    namespace SitefinityWebApp.Custom.Membership
    {
        public partial class AuthCheck : System.Web.UI.UserControl
        {
            public string RedirectPage
            {
                get;
                set;
            }
     
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!HttpContext.Current.User.Identity.IsAuthenticated)
                {
                    Response.Redirect(RedirectPage);
                }
            }
        }
    }

    Anyone know of a better way to do this in Sitefinity 6+?
  6. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    17 May 2013
    Link to this post
    Hello Basem,

    You can take a look at the following blog post for a solution. The approach described there is available for 5.2+ versions of Sitefinity. 

    Regards,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
6 posts, 0 answered