ASP.Net: App_Offline.htm as a Maintenance Page

While Googling about, I came upon an oldy-but-goody, that apparently has been available since the release of ASP.Net 2.0: App_Offline.htm.

An undocumented feature, you can copy a file called app_offline.htm into the root of your .Net website and the application will “bleed off” existing connections and redirect all new requests to the app_offline.htm page.

Once you remove the file, requests will again go back to your site.

Here’s ScottGu’s posts about it from back in 2005:

One thing to note if you are using ASP.Net MVC.  Be sure your system.webserver configuration is set up to handle all requests so you don’t get 404s instead of the app_offline.htm page:

[cc lang=”xml”]


This entry was posted in ASP.Net, IIS, MVC. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *