Copied to clipboard

Flag this post as spam?

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


  • Lesley 2 posts 72 karma points
    Aug 10, 2022 @ 00:13
    Lesley
    0

    Custom routing and MemberAuthorize

    We need to use either custom routing or content finders to map urls to doc types.

    All our doc type RenderMVCControllers have the [MemberAuthorize()] attribute as we need to make sure the member has logged in.

    If we use content finders, the member is redirected to the login page if they are not logged in e.g. their member login has timed out. However, there is a lot of url segment manipulation to find the correct content finder.

    If we use custom routing, we don't need to do any url segment manipulation, however if the member is not logged in, instead of being redirected to the login page, we are getting the error "This type of page is not served."

    Why is there a difference between the two approaches? How can we use the custom routing approach and redirect to the login page is necessary?

Please Sign in or register to post replies

Write your reply to:

Draft