• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Custom 404 errors pages

wxman

More time posting than coding
Thanks received
0
What is the best way to handle ALL 404 error pages?

I am trying to redirect any and all 404 errors towards a custom 404 page for a client – in order to do this I am testing it on my “test” web site written in “C# .NET2”

Custom 404errorPage.aspx

Web.config
<customErrors mode="On">
<error statusCode="404" redirect="404ErrorPage.aspx" />
</customErrors>

Works
http://www.stormtrack.co.uk/1.aspx
Does not work
http://www.stormtrack.co.uk/1

How do I over ride the standard IIS6 404 error page for all 404’s on the http://www.stormtrack.co.uk/ Domain ??
 
In IIS - In the Properties of the website - two tabs you need to look at ASP.Net and Custom Errors...

You may need to edit the ASP.NET configuration for Custom Errors, and the default behaviour / file extension...

?
 

Advertisers

Back
Top