Group: Forum Members
Last Active: Thu 11 Jul 2019
Am I the only one that really dreads the 404.aspx 'Oops' look?
I can understand that running a full themed page might further complicate the execution of an erroneous application, but Can't we at least use some sort of cloned HTML version of the masterpage's skin?
Last Active: Wed 18 Nov 2020
The 404 and 500 oops pages are deliberately self contained and relatively simple. The problem with having dependences on master pages or other user controls is that failures in these that trigger 404 or 500 messages can end up triggering further errors, into a chain reaction.
For example, let's say there is a missing css file, that is part of the skin. If this is requested, the server will return a 404 page. If this itself is based on the skin, that 404 page also includes reference to the missing css file, which returns another 404 page missing the same file and so on.
500 errors potentially could also trigger loops, if the error is within a user control or the master page or other dependency of the 500 page that is called, such as when the db is unavailable for example.
In both cases, we try to make the pages self contained, so any CSS they need is embedded within the page itself and they don't nest any user controls, or inherit base classes or master pages. The idea is that when there is an error, we return the error code to the browser, some HTML that will visually alert a user, then shutdown the request.
It is possible to use images on the pages too, but rather than link to files (which could result in 404s), you could base 64 encode the image into the page.
This has a good tool for encoding, and a tutorial showing how to use base 64 encoded images within HTML and CSS.
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.
If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb