Copied to clipboard

Flag this post as spam?

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


  • Shada 55 posts 137 karma points
    Oct 09, 2015 @ 12:17
    Shada
    1

    Redirect to 404 Error page from surface controller

    Hi! I edit my configuration file /config/umbracosettings.config:

      <error404>31027</error404>
    

    This works fine when I enter a nonexistent url. Now I need to redirect to this error page in my surface controller. I try:

        if (isFound)
        {
            return View();
        }
        else
        throw new HttpException(404, "Not Found");
    

    But it doesn't come to the 404 custom page.

    enter image description here

  • Damian Green 452 posts 1433 karma points
    Oct 11, 2015 @ 22:49
    Damian Green
    0

    I seem to remember having something like this before but i cant for the life of me remember what it was....

    As a temp workaround you could just redirect to the pageid from the controller - but its not going to give the 401 code to the browser then - even though you get the template. Not sure if this would be an issue for you.

  • Shada 55 posts 137 karma points
    Oct 14, 2015 @ 10:38
    Shada
    0

    Is it possible to get pageid error page from my umbracosettings.config?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies