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

Forums / Developing with Sitefinity / Redirect visitors who are not log in.

Redirect visitors who are not log in.

3 posts, 1 answered
  1. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    19 Jan 2010
    Link to this post
    I have a section of the website that requires the user to be log in.  On the page properties, I set the Security to Anonymous access : Deny.   Under the Permissions I set the role that is allow to view the page. 

    This works greats, I have to be log in to see the page.  How every if I try going directly to the page, I am redirected to Sitefinity admin log in page.  How do I redirect to log in for the Web site users?

    I am thinking maybe checking to see if the user is Authenticated and the role in the master page (page load).  Is there away to do this within Sitefinity?

    David
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    19 Jan 2010
    Link to this post
    Hi David ,

    You can change the loginUrl property of forms attribute in the web.config file

    <forms name=".ASPNET" loginUrl="~/mypage.aspx" protection="All" timeout="1440" path="/"/>

    Another option is redirecting the user if it is not authenticated to another custom page using Reponse.Redirect - you can create a user control, implement this logic in the navigation you use, using masterpage, HttpHanlder or HttpModule.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    19 Jan 2010
    Link to this post
    Thanks Ivan,  I will give the web.config file change a try.

    David
Register for webinar
3 posts, 1 answered