2
votes

I am using using Umbraco 4.7 and my server is IIS7 was wondering what is not going right for me. I basically want to make a custom error page (404) and everything I have tried is not working, checked the forums, but it is still showing the same problem.

I have edited my umbracoSettings.config

<errors>
   <!-- the id of the page that should be shown if the page is not found -->
   <!-- <errorPage culture="default">1647</errorPage> -->
   <!-- <errorPage culture="en-US">1647</errorPage> -->
   <error404>1647</error404>
</errors>

Also I have looked about saying adding this to the web.config file.

<httpErrors errorMode="Custom" existingResponse="Replace">
   <remove statusCode="404" subStatusCode="-1" />
   <error statusCode="404" prefixLanguageFilePath="" path="/error.aspx" responseMode="ExecuteURL" />
</httpErrors>

Any help would highly appreciated. I am a complete novice to IIS and anything involving network settings.

3
Manage to resolve this, Going to IIS > Sites > Mywebsite > Error Pages > 404 > Edit feature settings > change local requests to detailed erros. and it worked. - Paul Stewart

3 Answers

17
votes

Make sure that 1647 is node id of the 404 page.

Also add the below code in the system.webServer tag in your web.config.

<httpErrors>
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="400" path="/404" responseMode="ExecuteURL" />
    <error statusCode="404" path="/404" responseMode="ExecuteURL" />
</httpErrors>

Hope this works...

5
votes

Just in case someone stumbles across this like I did when researching a similar problem with Umbraco 7, setting trySkipIisCustomErrors value to true in config/umbracoSettings.config file did it for me.

  <web.routing
    trySkipIisCustomErrors="true"
    internalRedirectPreservesTemplate="false">
  </web.routing>
2
votes

I experienced the same problem, and the solution suggested by Sobin P Samuel worked for me (just copy and paste the httpErrors element directly to the system.webserver section in your Web.Config-file), so I guess this is also what resolved it for paulstewart185...

Please note that according to http://our.umbraco.org/wiki/install-and-setup/configuring-404-pages the solution for IIS 7.5 would be to add the following to the system.webserver section:

<httpErrors existingResponse="PassThrough"/>