Thursday, March 23, 2006

For site maintenance consider app_offline.htm 

If you are making updates to your site and want to keep the users at bay with a polite notice then look no futher than the app_offline.htm file.

Create an HTML file called app_offline.htm, drop it in the root directory of your web, and your site will be offline with style.

Very early in the request cycle, ASP.NET 2.0 looks for the app_offline.htm file. If the file exists, ASP.NET stop processing requests for that application, unload it, and route all incoming requests to the app_offline.htm where your custom message awaits.

One handy side effect is the fact that this releases any locked resources such as databases in the app_data directory.

When finished, delete or even rename the app_offline.htm file to return users to their regularly scheduled browsing.

Comments: Post a Comment

This page is powered by Blogger. Isn't yours?