From time to time operations may find the need to bring down an entire ASP.NET web site for maintenance. And of course a warning message indicating how long the maintenance will take would be useful. ASP.NET 2.0 makes this easy with the magic file known as App_Offline.htm.
By simply placing a file named App_Offline.htm in a web site's root folder switches the site to maintenance mode. The app-domain is shut down and all incoming requests return an error code with the contents of the App_Offline.htm. Once maintenance is complete and the file is deleted, the next request will restart the app-domain.
In order to prevent Internet Explorer from showing "Friendly Http Errors" instead of your message, developers should ensure the App_Offline.htm is at least 512 bytes long. If you simply don't have that much content, the file can be padded with HTML comments or other hidden text.