BT

InfoQ Homepage News In Case You Missed It: App_Offline.Htm

In Case You Missed It: App_Offline.Htm

Bookmarks

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.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.