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

Forums / Developing with Sitefinity / Configuring authentication for public users

Configuring authentication for public users

2 posts, 0 answered
  1. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    09 Aug 2011
    Link to this post
    I have been looking for a way to configure authentication for my public users to my Sitefinity Page within the Sitefinity Administrative User Interface, but have not found a way to accomplish this.

    I have added a Login control to my Sitefinity Page and the Login View and Login Status controls to my other secured pages.  I have also denied anonymous access to these pages.

    Is there an easy way within Sitefinity to configure the Sitefinity Page as my default redirect Login form whenever a user directly attempts to access one of these secured pages? 

    Also, I have created a "Public" User Role with no permissions within Sitefinity and added my users to this role.  Is this the correct way to configure roles for publicly authenticated users?
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    10 Aug 2011
    Link to this post
    Hello Samir Vaidya,

    In order to redirect anonymous users to the login page, everytime they try to access a forbidden page, you will have to customize the "403 HTTP error" that is received by the user. This can be done by going to the web.config file of your application and adding the following code under the <customErrors> tag (your_login_page_url is the url of the desired redirect page):

    <customErrors mode="On">
                    <error statusCode="403" redirect="your_login_page_url" />
     </customErrors>

    Creating the "Public" role for publicly authenticated users is a good decision, although there is a built-in "authenticated" role that is applied to every user by default. So - if you don't want them to have any permissions besides viewing the page, you should simply not set any role to them (they would be just "authenticated" by default.
    Hope that helps.

    Kind regards,
    Svetoslav Petsov
    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
2 posts, 0 answered