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

    Redirect to 404 Error page from surface controller

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


    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();
        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

    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

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

Please Sign in or register to post replies

Write your reply to: