Copied to clipboard

Flag this post as spam?

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


  • Daniel Nøhr 14 posts 35 karma points
    Sep 20, 2009 @ 22:00
    Daniel Nøhr
    0

    404 handler - Doesn't work

    Hello..

    I was wondering if others got problems with the 404 handler?

    I cant make it work, here is my code from umbracoSettings.config..

        <errors>
          <!-- the id of the page that should be shown if the page is not found -->
          <!-- <errorPage culture="default">1</errorPage> -->
          <!-- <errorPage culture="en-US">200</errorPage>-->
          <error404>1119</error404>
        </errors>

    I'm running with the .NET 3.5 webconfig, Umbraco 4.0.1.2, Windows 2008 and using umbracoUseDirectoryUrls (have tried turned it off, didn't help)..

    And of cause the page node 1119 exists :-)

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 21, 2009 @ 00:19
    bob baty-barr
    0

    i don't think your code is right... remove your <error404> node

    and just uncomment the <errorPage culture="default">1119</errorPage>

    that should get you up and running.

  • Daniel Nøhr 14 posts 35 karma points
    Sep 21, 2009 @ 08:25
    Daniel Nøhr
    0

    Hey bob.

    I have tried this one too, still doesn't work..

        <errors>
          <errorPage culture="default">1119</errorPage>
        </errors>

    Any ideas of what why my page won't accept this one?

    I just get the default 404 iis error pages. But my extensionless website works very well beside this problem :)

  • Richard 146 posts 168 karma points
    Sep 21, 2009 @ 11:13
    Richard
    0

    Daniel,

    What you posted looks the same as the configuration we are using on a Umbraco 4.0.0, Windows 2003 site:

    <errors>
          <!-- the id of the page that should be shown if the page is not found -->
          <!--        <errorPage culture="default">1</errorPage>-->
          <!--        <errorPage culture="en-US">200</errorPage>-->
          <error404>1234</error404>
    </errors>

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    Sep 21, 2009 @ 11:20
    Sebastiaan Janssen
    0

    Have you checked to see in your web.config if you maybe have the customErrors defined somewhere like this:

    <customErrors mode="On">
    <error statusCode="404" redirect="My404ErrorPage.aspx" />
    </customErrors>

    I think the web.config settings will overrule Umbraco's settings (I haven't tested this). customErrors is off on my install and then your first example works fine.

  • Ted Jardine 98 posts 120 karma points
    Sep 21, 2009 @ 23:17
    Ted Jardine
    0

    I'm also having the same issue: No 404 handling on site with:

    - Umbraco 4.0.2.1
    - Windows Server 2008 x64
    - IIS 7 under Integrated Pipeline

        <errors>
          <!-- the id of the page that should be shown if the page is not found -->
          <!--        <errorPage culture="default">1</errorPage>-->
          <!--        <errorPage culture="en-US">200</errorPage>-->
          <error404>1177</error404>
        </errors>

    Hopefully what solves the 404 issue solves another issue I'm having: http://our.umbraco.org/forum/getting-started/installing-umbraco/4237-Touch-Webconfigapplication-restart-=-first-request-500---Internal-server-error

     

  • Ted Jardine 98 posts 120 karma points
    Sep 21, 2009 @ 23:24
    Ted Jardine
    0

    Changing the EnableSplashWhileLoading setting to False solves my initial request 500 error:

        <!-- Show the /config/splashes/booting.aspx page while initializing content -->
        <EnableSplashWhileLoading>False</EnableSplashWhileLoading>

    but 404 handler still not happening.

    However, switching to Classic Pipeline makes it work. Therefore, the issue definitely has to do with running under Integrated Pipeline.

     

  • Daniel Nøhr 14 posts 35 karma points
    Sep 22, 2009 @ 08:23
    Daniel Nøhr
    0

    Thank you for sharing information everyone, especially you Ted. Cause i can see you got the same setup and problem.

    My solution is on a hosted server, so changing the pipeline is a bit difficult. Did you change the pipeline, and is there any performance downgrade on that action?

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    Sep 23, 2009 @ 05:33
    Sebastiaan Janssen
    0

    I am running everything on Integrated Pipeline, and with the asp.net 3.5 web.config. No problems here.

  • Ted Jardine 98 posts 120 karma points
    Oct 01, 2009 @ 02:46
    Ted Jardine
    0

    Daniel: I'm using integrated pipeline, and can easily switch it to classic and have no issues. However, for other requirements I need to run integrated.

    Sebastiaan: Argh. That doesn't make sense. Umbraco is the only 3.5 app that I've had this issue with...

     

  • Ted Jardine 98 posts 120 karma points
    Oct 02, 2009 @ 20:10
  • Ted Jardine 98 posts 120 karma points
    Oct 02, 2009 @ 20:20
    Ted Jardine
    0

    Sebastiaan: are you running it under Windows Server 2008 x64?

     

  • Ted Jardine 98 posts 120 karma points
    Oct 02, 2009 @ 20:28
    Ted Jardine
    0

    IIS7 integrated pipeline and errors item posted to CodePlex: http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24786.

  • Ted Jardine 98 posts 120 karma points
    Oct 07, 2009 @ 02:14
    Ted Jardine
    2

    Solved. Please see Please see http://www.andornot.com/about/developerblog/2009/10/errors-sending-right-message.aspx for more information.

    http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24786

    But should documented:

    Windows Server 2008 with IIS7 by default hijacks responses with status codes apart from 200 OK and replaces the response with the specified built-in error pages. This does not apply on Vista or Windows 7, and I assume many hosts switch this behaviour by default. Therefore, only a smaller segment of users would typically run into this.

    As setting the Response.TrySkipIisCustomErrors = true; everywhere is not very feasible, there is a work around that appears to work: flip a switch in your applicationHost.config file that passes your response through without IIS hijacking it. This is the sledgehammer approach, but works as required for Umbraco as it goes back to for i.e. IIS 6 default approach. Non-200 status code responses now are handled within Umbraco without being hijacked (i.e. NotFoundHandlers, booting screens, etc.).

        <location path="Site Description">
            <system.webServer>
                <httpErrors existingResponse="PassThrough" />
            </system.webServer>
        </location>

    Thanks to Fabian Heussser's comment on Rick Strahl's post that helped with this (http://www.west-wind.com/weblog/posts/745738.aspx#829305).

  • Daniel Bardi 913 posts 2540 karma points
    Jun 11, 2010 @ 11:25
    Daniel Bardi
    5

    That fixed my problem... just added <httpErrors existingResponse="PassThrough" /> to my web.config under <system.webServer>

     

    Danka!

  • Shannon Deminick 1488 posts 5014 karma points hq
    Dec 17, 2010 @ 02:45
    Shannon Deminick
    0

    Nice, IIS 7 seems to have a lot of hidden options to make it do what you want... not sure why these options aren't in there by default.

  • Martin 48 posts 69 karma points
    Dec 24, 2010 @ 01:53
    Martin
    0

    Is it possible to specify a 404 by recursive property? (For when you have multiple sites in one installation).

    Martin

  • Søren Reinke 158 posts 206 karma points c-trib
    Apr 19, 2013 @ 09:57
    Søren Reinke
    0

    Thanks Ted

    Just had the same problem on an ancient 4.0.3 install, your tip worked perfectly :-) 

Please Sign in or register to post replies

Write your reply to:

Draft