Using the app_offline.htm in ASP.NET

The app_offline.htm can be used as a nice & clean way to tell the people that access your website when it is down for maintenance tasks. Scott Guthrie talks about this very helpful feature of ASP.NET 2.0 here and also here.

Basically, when you do not want anyone to access your site, you place a file named app_offline.htm in the root of your web application. When users access your site, they will see the rendered contents of the app_offline.htm file. You can have it display a very simple message like “This site is down for maintenance”. Once the maintenance is complete, simply delete or rename the file.

This is my offline page -

Now I just need to remember to rename the app_offline.htm file when I am finished working on the site.

Posted on February 4, 2007, in ASP.NET. Bookmark the permalink. Leave a Comment.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.