Copied to clipboard

Flag this post as spam?

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


  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 28, 2011 @ 10:53
    Chriztian Steinmeier
    1

    How are you getting a simple 404 error page working?

    I would really like to know how you all do your 404 (and maybe other types of) error pages in Umbraco.

    According to what I've been able to find, it *should* be as simple as creating the page somewhere in your Umbraco solution and putting that page's ID in the umbracoSettings.config file. Done deal.

    However, it seems to be not quite so simple - and, unfortunately, solutions that work for some people, don't work for others, so the forum is swamped with posts about this.

    I also realize that what worked on IIS6 may not work on IIS7 and/or future versions - that's just the way it is...

    So how do you do it? What works? Do I really need to write a handler for something like this (which seems to be the only thing that works for everybody)?

     

     

  • Rich Green 2246 posts 4008 karma points
    Oct 28, 2011 @ 10:58
    Rich Green
    1

    Hey Chriztian,

    Agree that it might not be necessary but I use this from uComponents http://ucomponents.codeplex.com/wikipage?title=SearchForPageNotFound

    It also allows the user to select their own 404 page too.

    Rich

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 28, 2011 @ 11:21
    Chriztian Steinmeier
    0

    Good solution Rich - I always install uComponents anyway. But — alas, we're already in the "works for you - not for me" trap, 'cause I can't get that to work... and it's probably for the same reason that Umbraco's "standard" <error404>ID</error404> doesn't work - it really looks like those handlers never run, because I'm getting the server's errorpage (it's not Umbraco's anyway)...

    /Chriztian

  • Rich Green 2246 posts 4008 karma points
    Oct 28, 2011 @ 11:33
    Rich Green
    1

    Hmm, very strange and frustrating.

    How are you installing Umbraco, via the WPI or manually, also are you using IIS Express or the full version?

    Happy to do some testing here for you to see if I get the same results.

    Rich 

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 28, 2011 @ 22:36
    Jan Skovgaard
    1

    Hi Chriztian

    Hmm, I have succesfully setup 404 pages in 4.0.2.1 and 4.7.1 installations without too much trouble all running on IIS7.5, by just doing what you describe above.

    With what version are you having the trouble described above? Is it v4.x in general?

    It certainly should not require you to write a handler to do it.

    /Jan

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 28, 2011 @ 22:51
    Tom Fulton
    1

    ...to add another solution to the mix, I always do it using the web.config and have no problems:

      <system.webServer>
            ...................
            <httpErrors>
                <remove statusCode="404" subStatusCode="-1" />
                <error statusCode="404" prefixLanguageFilePath="" path="/error" responseMode="Redirect" />
            </httpErrors>
      </system.webServer>

    -Tom

  • Rodion Novoselov 694 posts 859 karma points
    Oct 29, 2011 @ 19:31
    Rodion Novoselov
    1

    It (that's in the umbracoSettings.config flile) seems to be targeted to work only for the 404 error. And I've found that there's somehow unobvious logic in how it handles this configuration key. If you're interested you can find it in the umbraco.library.GetCurrentNotFoundPageId() method.

  • Richard 146 posts 168 karma points
    Feb 23, 2012 @ 14:44
    Richard
    1

    Chriztian,

    I have used your stated method of creating the error page somewhere in your Umbraco solution and putting that page's ID in the umbracoSettings.config file, with Umbraco 4.0.4.2 and 4.5.2, with IIS6.

    If you are getting the server 404 page, then that would suggest the request is not being handled by Umbraco, in Umbraco 4 at least, it has its own error "intentionally ugly" page for not found pages.

    Richard

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Sep 17, 2012 @ 22:09
    Chriztian Steinmeier
    0

    Since the Our robot poked me to pick a solution here, I'll say that it *was* actually as simple as I'd written it, i.e., setting the ID of the designated page in umbracoSettings.config.

    Key to the problem was (and I've found that to be the root of a couple of other problems too) that the IIS wasn't in "Integrated Mode" - on this specific site, didn't have access to the IIS so I'd assumed everything was setup as requested...

    /Chriztian 

Please Sign in or register to post replies

Write your reply to:

Draft