+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Non-aspx 404 problems

Non-aspx 404 problems

6 posts, 0 answered
  1. michael
    michael avatar
    15 posts
    Registered:
    22 Jan 2009
    04 Feb 2009
    Link to this post
    Hi everyone,

    I'm having an issue with the 404 handling. In my current setup, I have IIS sending 404s to "/sf404.aspx", and I have my web.config sending 404s "/404.aspx".

    This is working fine for 404s to ASPX pages, and for extenstionless URLs, but all other file types are getting the basic IIS 404 error, which is a blank page which says:

    "The system cannot find the file specified."

    I'm guessing the syste can't find "/sf404.aspx" because it's not a real file. How do I solve this? We need to be able to track our 404s to non-aspx pages, to fix broken links that pop up, and redirect old pages.
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    04 Feb 2009
    Link to this post
    Hi Michael,

    The problem actually is that your custom extensions are not mapped in IIS to Asp.Net ISAPI. Here is what actually happens when you have an aspx request:

    Request -> IIS -> Asp.Net ISAPI -> Sitefinity

    In other words, IIS redirects all requests for ASPX to the Asp.Net environment, and Sitefinity is able to process the code. When you request a regular file, or html page, IIS processes it (but not Asp.Net framework, since this extension is not mapped to it). If the file is there, then IIS serves it, otherwise the server returns the original 404 page. If you want to map all requests to Asp.Net, you can do it with wild card mappings (it is described in our User Manual) or, you can only the extension you want to be processed by Asp.Net. This is exactly the case, when we were mapping sflb and tmb extensions in our previos versions. Please refer to our Troubleshooting section where we show how to add some extension to IIS. Use the same approach for all custom extensions you want.

    This should do the trick.

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    04 Feb 2009
    Link to this post
    I have a problem with this response (this is the same as I got in my support ticket)...

    if I'm understanding things correctly, IIS does not intercept and handle non-aspx pages as you've described because in order for the sf404 page in sitefinity to work, we have to intercept all 404 errors and execute the sf404 page instead. That means whether the page not found is stuff.aspx or stuff.pdf, that error is caught and the sf404.aspx page executes.

    and if I'm still correct here, it's this sf404 page that should either redirect (such as if we're doing extensionless urls) or throw the standard 404 error. However, it appears to only be doing this if the page is aspx...

    if we were supposed to be seeing the standard 404 page then we would see the standard 404 page, and not the "The system cannot find the file specified" because it appears this error message is being generated by sf404.aspx, not IIS!

    does that make sense?
  4. michael
    michael avatar
    15 posts
    Registered:
    22 Jan 2009
    04 Feb 2009
    Link to this post
    Great... so since sf404.aspx doesn't exist, how do I edit it? Mapping every extension to go through the ASP.NET ISAPI sounds like a performance nightmare.

    So let me get this straight... I need to point 404's to sf404.aspx to use extensionless URLs, but since it's not a real page, that's killing my opportunity for 404 tracking?
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    04 Feb 2009
    Link to this post
    thats about what i figured but I could be wrong... it seems to me that the simplest solution is to have this sf404 page return the standard 404 page for any extension, not just aspx... since IIS is calling this page for all requests (not just aspx) it shouldn't be necessary to map all extensions...

    but then again I don't really know very much about IIS so I can't say for sure if this is all bunk :)
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    06 Feb 2009
    Link to this post
    Hello,

    So let me get this straight... I need to point 404's to sf404.aspx to use extensionless URLs, but since it's not a real page, that's killing my opportunity for 404 tracking?

    Generally, yes.

    Based on your input (and Josh's too, of course), we made some optimizations for the 3.6.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
6 posts, 0 answered