Let's imagine you have a standard application deployed in IIS (here, the "MyApp" application). Simply browsing the application will show you the default page content, and you can also access any page of the website.
Now let's imagine you want - for maintenance reasons for example - bring this application offline.
If you stop IIS or your application pool, all your customers will receive an HTTP error, typically a 500 error. Let's imagine you want to have real "maintenance page" whatever the request they will do.
Of course you can change the "default" document in IIS, but if they ask for a specific page, this won't work.
IIS has this feature fully integrated. Simply add a page named "app_offline.htm" in the virtual directory and let's try now several requests, asking either for the virtual directory itself or for any page in the application.
This is pretty cool no ?
Just note that this will work if the client ask for aspx pages. Any other format will be served normally.
Scott Guthrie has also noted that you maintenance page should have a minimal weight otherwise, you would encounter some trouble. Check his blog entry here.
Working another way for maintenance sessions ? Please leave comments !