Copied to clipboard

Flag this post as spam?

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


  • Connie DeCinko 931 posts 1160 karma points
    Sep 24, 2010 @ 18:30
    Connie DeCinko
    0

    All 404 Requests Being Handled, Except those to .aspx

    I have been going round and round on this issue all week.  Since no one can seem to agree upon a single reliable method for handling 404 errors and redirecting, I decided to go with the non Umbraco method.  I have a .NET page that handles all 404 requests for any file extension, from any source and all looks good.  Except...  Any requests to a .aspx file result in the ugly Umbraco 404 page.  No matter what I try, I cannot get these 404 requests to redirect to my 404 page.

    I tried a custom error handler, no good.  I set a custom error in my web.config and still no good.  What next?

     

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 24, 2010 @ 20:04
    Morten Bock
    0

    There is a section in the umbracoSettings.config file that defines what should be shown in case there is not a page that matches the url:

        <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>1</error404>
        </errors>
    
    Just replace the "1" with the ID of an umbraco page that you want to use.

     

  • Connie DeCinko 931 posts 1160 karma points
    Sep 24, 2010 @ 20:11
    Connie DeCinko
    0

    The page does not have an Id.  It is an .aspx page outside of Umbraco.

     

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 24, 2010 @ 22:44
    Morten Bock
    0

    I know, but since umbraco will handle any .aspx url, then you will need to let an umbraco page be the target. Should not be too difficult to share the functionality of your external page with th umbraco page. Just make a shared masterpage that they both use.

  • chris 69 posts 92 karma points
    Sep 27, 2010 @ 19:01
    chris
    0

    are you using iis 7.5? I had the same problem, I had to use IIS to customize the page. editing the umbracosettings config file didn't do anything, neither adding to the <customerrors> redirect section. the method described to give custom error in that .net notice might work for older iis, in my case I'm using IIS 7.5.

  • Connie DeCinko 931 posts 1160 karma points
    Sep 27, 2010 @ 19:29
    Connie DeCinko
    0

    Yes, IIS 7.5 here as well.  I looked at creating a wildcard in IIS but based on what I've read, that's a bad approach and causes performance issues.  Seems the only workable method is to create a 404.aspx that I point IIS at.  This is used for any non-Umbraco requests, such as to our old pages or someone guessing .html, etc.  Then I use a handler in Umbraco for requests to .aspx/Umbraco content that does not exist.  Problem I am having now is requests for .aspx are getting the ugly message.  I had it working before.  The whole process is ugly but if I can get the end result working.

    End goal:  301 redirect requests to old pages based upon looking up old and new URLs in a SQL table.  Anything without a match, I parse and send to the search page.

     

  • Connie DeCinko 931 posts 1160 karma points
    Oct 04, 2010 @ 17:16
    Connie DeCinko
    0

    Follow up:  Still unable to get Umbraco to handle requests for .aspx pages.  All others being correctly handled by my stand alone 404 page specified via IIS.

     

  • Paul A 133 posts 368 karma points
    Nov 19, 2010 @ 17:00
    Paul A
    0

    Did you manage to get this working? I'm having same prob... all 404s (/something, /something.html, /something.jpg) except requests for missing .aspx pages.

    Cheers for any help,

  • Connie DeCinko 931 posts 1160 karma points
    Nov 19, 2010 @ 17:43
    Connie DeCinko
    0

    Still having the same issue with no good resolution.

     

  • Paul A 133 posts 368 karma points
    Nov 30, 2010 @ 15:24
    Paul A
    0

    Hi,

    I managed to get this working by replacing the poetpatcher line in /config/404handlers.config with

    <notFound assembly="umbraco" type="handle404"/>

    More info at: http://our.umbraco.org/forum/templating/templates-and-document-types/13923-Unable-to-get-custom-404-page-to-work

Please Sign in or register to post replies

Write your reply to:

Draft