"App_Offline.htm" feature provides a super convenient way to bring down an ASP.NET application while you updating a lot of content or making big changes to the site where you want to ensure that no users are accessing the application until all changes are done.
The way app_offline.htm works is that you place this file in the root of the application. When ASP.NET sees it, it will shut-down the app-domain for the application and instead send back the contents of the app_offline.htm file in response to all new dynamic requests for the application. When you are done updating the site, just delete the file and it will come back online.
Thanks! Just a few notes about this. You can expirience problem with this in IE6.0 because of "IE Friendly Errors" feature. For more deatails take a look at Scott Guthrie's blog entry http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx
Sergey 11/8/2007 4:44:55 PM
The only problem with such App_Offline, is that we can't test the web site after the update. I mean, we (developers only) can't navigate the site while it's still "offline" for normal users. Even if I try http://localhost/mywebapp on the web server, I'm receving the App_Offline.htm page. In fact, I would like to check everything is fine on the production server (mainly web.config configuration errors) before letting everyone to use it. Do you have any idea to bypass this ?
mat 1/9/2008 6:59:22 PM
I totally understand what you mean. There is no ability to check if deployment went fine. Unfortunately, I'm not aware of any out of the box support of that. May be there is a custom implementation.
kostya.ly 1/9/2008 8:10:22 PM