Where is the page of "HTTP Error 404.0 - Not Found" RRS feed

  • Question

  • User-1361715659 posted


    When I try to view a broken static file in my website, I get the error page titled "HTTP Error 404.0 - Not Found"
    URL: https://www.xtopia.io/ss.img

    How do I overwrite this setting or change the file itself?

    I found the 404 file at C:\inetpub\custerr\en-US but it is not actually the same file.

    I also try in web.config as below but it shows "The page cannot be displayed because an internal server error has occurred.":
    <httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto">
    <remove statusCode="404" />
    <error statusCode="404" responseMode="ExecuteURL" path="404.htm" />


    Friday, June 1, 2018 6:04 AM

All replies

  • User1472485574 posted

    Look at this blog. This is how you add your custom error page.





    Friday, June 1, 2018 7:50 PM
  • User-1361715659 posted

    Thanks but i already added the custom error.
    My issue is that it is working with aspx but not working with js and img file.
    Please refer to my link in the first post. Thanks.
    Saturday, June 2, 2018 1:41 AM
  • User283571144 posted

    Hi huislaw,

    As far as I know, the customErrors tag only works for the server pages not for static files(js or image).

    So you will find it show the 404.html page not aspx error page.

    I suggest you could use httperrpr instead of custom error.

    You could opne the iis console manager and find the error pages acion.

    More details, you could refer to below image:

    More details about how to enable the httperror in web config, I suggest you could refer to below aritcle.


    Best Regards,


    Monday, June 4, 2018 3:10 AM
  • User-1361715659 posted

    I managed to handle static files such as .js and .img.

    https://www.xtopia.io/nothispage - OK

    https://www.xtopia.io/nothispage.aspx - OK

    https://www.xtopia.io/nothispage.js - OK

    https://www.xtopia.io/WebResource.axd  - Not OK

    But now I noticed the axd file still cannot be handled https://www.xtopia.io/WebResource.axd 

    How can I solve this?


    Wednesday, June 6, 2018 8:37 AM
  • User283571144 posted

    Hi huislaw,

    As far as I know, the WebResource.axd an HTTP Handler that is part of the .NET Framework that does one thing and one thing only – it is tasked with getting an embedded resource out of a DLL and returning its content. 

    So it will not go to the custom error page. It will only work with httphandler exception.

    Here is a workaround, I suggest you could use url rewrite to to directly redirect the WebResource.axd to 404 error page.

    More details, you could refer to below url rewrite setting.

                    <rule name="test" stopProcessing="true">
                        <match url="WebResource.axd" />
                        <action type="Redirect" url="http://localhost:4568/" />



    Best Regards,


    Thursday, June 14, 2018 2:52 AM
  • User-1361715659 posted


    The WebResource.axd is needed for 3rd party component, so we cannot redirect it.

    Is there other way to solve this?


    Monday, September 3, 2018 2:52 AM