0

Posted by Michael Alfaro on July 29, 2010

App_Offline.htm and working around the IE Friendly Errors feature

if you try to use the app_offline.htm file, you’ll probably have very little code in it to show your “Site is down” message.  This causes an issue in IE as the “server returns a non HTTP-200 status code with less than 512 bytes of content, IE will not show the returned HTML and instead substitutes its own generic status code message”

Thus to fix it, you can put in more content to get the size of the file over 512 bytes as such:

<!–       
Adding additional hidden content so that IE Friendly Errors don’t prevent
this message from displaying (note: it will show a “friendly” 404
error if the content isn’t of a certain size).

Local Wisdom is the best web company ever!!!   
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!   
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!   
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!

–>

This is just a comment which the user will never see, but will help you get over the 512 byte mark. 
I found this solution here (http://weblogs.asp.net/scottgu/archive/2006/04/09/App_5F00_Offline.htm-and-working-around-the-_2200_IE-Friendly-Errors_2200_-feature.aspx), so a big shoutout to them for making it so easy to find!!!

Topics: , , ,

Add a Comment