Copied to clipboard

Flag this post as spam?

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


  • Rasmus Eeg Møller 3 posts 51 karma points c-trib
    Jul 07, 2014 @ 10:49
    Rasmus Eeg Møller
    0

    404handler doesn't show custom error page

    404handler doesn't show custom error page when url is something like "blabla.html" The response is empty. Test url: http://spisbedre.dk/kontakt.html, even our UrlTracker doesn't work. 404handlers.config url's without .html works fine, redirects to custom error page

    How do i go about this?

     

    Best regards

    Rasmus

  • Mike Chambers 635 posts 1252 karma points c-trib
    Jul 07, 2014 @ 11:00
    Mike Chambers
    101

    Think this one does somewhat depend on which version of IIS is involved in your hosting.

    As not all would by defatult use asp.net pipeline for all requests.

    IIS7+ 

    We add in the web.config

        <httpErrors errorMode="Custom">

          <remove statusCode="404" subStatusCode="-1" />

          <error statusCode="404" prefixLanguageFilePath="" path="/1000.aspx" responseMode="ExecuteURL" />

        </httpErrors>

    Which is a little hacky as it basically means a 404 redirects to a unknow aspx page which umbraco then picks up. and forwards via your 404 handler in umbraco

     

  • Rasmus Eeg Møller 3 posts 51 karma points c-trib
    Jul 07, 2014 @ 11:57
    Rasmus Eeg Møller
    0

    Cheers works like wonders!

     

  • Arie 224 posts 675 karma points
    Aug 31, 2014 @ 06:11
    Arie
    1

    Here's a better way:

    IIS 7.5+

    You may find that you don't get your error pages and IIS takes over. To get Umbraco to handle your errors for 404 insert the following element before the end of the system.webServer section of the web.config.

    Now the errors you configured in the umbracosettings.config should display.

    Source

  • Rasmus Eeg Møller 3 posts 51 karma points c-trib
    Sep 01, 2014 @ 08:25
    Rasmus Eeg Møller
    0

    I tried following that guide, but it didn't work. I think it has something to do with Umbraco 7.

    If IIS takes over i should get an page displaying file not found. But it shows an empty page. As a standard response for umbraco v7 editors when not found.

    I Think.

  • Mike Chambers 635 posts 1252 karma points c-trib
    Sep 01, 2014 @ 09:19
    Mike Chambers
    0

    I also could never get this approach to work in u4.11 static files not found just resulted in a white screen.

  • Arie 224 posts 675 karma points
    Sep 01, 2014 @ 17:11
    Arie
    0

    Worked for me in Umbraco 7.1.6 (IIS 8.5).

  • Tajamal 87 posts 175 karma points
    Feb 03, 2016 @ 12:09
    Tajamal
    0

    It does not work for me in IE, Chrome and Firefox works fine.

    If anyone has found a working solution , please share.

  • Tom Engan 430 posts 1173 karma points
    Feb 03, 2016 @ 14:25
    Tom Engan
    0
    <settings>
    
      <content>
    
        <errors>
          <error404>1</error404>
          <!-- 
            The value for error pages can be:
            * A content item's integer ID   (example: 1234)
            * A content item's GUID ID      (example: 26C1D84F-C900-4D53-B167-E25CC489DAC8)
            * An XPath statement            (example: //errorPages[@nodeName='My cool error']
          -->  
        </errors>
    

    Have you tried to change ID-number between <error404>1</error404> (here 1) to the ID of your 404-document in umbracoSettings.config?

  • Glen Peters 24 posts 115 karma points
    Feb 16, 2017 @ 19:00
    Glen Peters
    0

    This does not work in Umbraco 7.5.

  • MuirisOG 382 posts 1284 karma points
    Jun 09, 2017 @ 14:46
    MuirisOG
    0

    Try the steps in Morten Sørensen's blog below. These steps worked for me.

    https://blog.mortenbock.dk/2017/02/03/error-page-setup-in-umbraco/

    (PS Thanks Morten)

Please Sign in or register to post replies

Write your reply to:

Draft