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

Forums / General Discussions / Secured Pages

Secured Pages

2 posts, 0 answered
  1. Allen
    Allen avatar
    71 posts
    Registered:
    04 Aug 2007
    12 Sep 2011
    Link to this post
    It used to be when you created a page, you could set a property to require the page to be seen only when logged in and if someone tried to access it, it would go to the 401 error.  Now (in 4.2), I have pages that I want to be visible on when logged in, but I have no idea how to route to a login page. I have set security on the pages for the correct roles, but users trying to access the page when not logged in, get a "this type of page is not served" error. What is the correct way to handle secured pages in 4.2?
  2. Bonny
    Bonny avatar
    58 posts
    Registered:
    11 Nov 2016
    15 Sep 2011
    Link to this post
    Hi Allen,

    I am not sure if I understand you, but I guess that you need a way to redirect user from "this type of page is not served" error page to login page. This can be done by inserting few lines in web.config:
    <system.webServer>
        <httpErrors errorMode="Custom" existingResponse="Replace">
          <clear />
          <error statusCode="404" path="404page.aspx" responseMode="Redirect"/>
          <error statusCode="403" path="403page.aspx" responseMode="Redirect"/>
        </httpErrors>
    ...
    You can also read this article: http://tedgustaf.com/en/blog/2011/5/custom-404-and-error-pages-for-asp-net-and-static-files/ 
    If you have any other questions feel free to ask.

    Greetings,
    Bonny
    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