404 Errors with htm and html Files

Discussion in 'DNS/Domain names' started by rtodd, Jan 16, 2011.

  1. I recently converted my old html site to asp. I was able to get the 404 error to work when the user types in a bad.aspx file name but my old domain links fail to go to the 404error.aspx file I vreated. I tried this...

    <customErrors mode="RemoteOnly" defaultRedirect="http://rtoddcom.w02.Winhost.com/404error.aspx">
    <error statusCode="404" redirect="http://rtodd.com/404error.aspx" />
    <error statusCode="500" redirect="http://rtodd.com/404error.aspx" />

    The error code is a 500 error but still get trapped but is not. Any help or experience?
    Last edited by a moderator: Oct 14, 2015
  2. Ray


    Make sure you try setting the custom error inside the IIS 7 Manager.

    First look at this kb article.


    Make sure you follow these instructions.

    How to update Error Pages in IIS 7.

    1. Log into IIS 7 Manager.

    2. Go to Error Pages.

    3. Click on the targeted status code.

    4. Click on Edit Feature Settings.
    a. Choose Custom error pages.
    b. Type the full server path to the custom error page.
    c. Set Path Type to: 'File'

    5. Click OK.
    Last edited by a moderator: Oct 14, 2015
  3. Almost but Error Encountered

    After downloading the software and installing, I was able to connect to my site / server. However, when I click on error codes the following messages appears.

    Filename: MACHINE/WEBROOT/APPHOST/rtodd.com
    Line: 51
    Error: Cannot add duplicate collection entry of type 'error' with combined key attributes 'statusCode, subStatus code' respectively set to '404,-1'

    Any ideas? This appears just by clicking the error page icon.
  4. Ray


    Did you manually code the httpErrors element in your web.config file?

    I suggest you drop the entry for now and use the Errors Page button in IIS 7 Manager.

    You will need to access your web.config file via FTP and make the changes manually.

Share This Page