App_Offline.htm
Categories
A cool feature that has been added in ASP.NET 2.0 is the App_Offline.htm file. Scott Guthrie blogged about it a while ago when he had this to say:
Basically, if you place a file with this name in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).
For my blog I have an HTML file named App_Offline.RENAMETO_htm that contains the page that I want people to see whenever I'm updating my website - such as when I'm uploading a new set of assemblies. Before I start the FTP process of the new files I simply rename that file to App_Offline.htm. Once the upload process has completed I then rename the file back to App_Offline.RENAMETO_htm.
The content that is displayed on my App_Offline.htm file basically tells the viewer about App_Offline.htm and explains that I'm probably updating my site right now :-)
#
Thanks for the info
posted by
Hessner
on
6/4/2006 6:10:40 AM
:
Cool, and thanks for sharing. I will sure use that one sometime soon.
#
ASP.NET 1.1 and app_offline.htm?
posted by
N
on
10/7/2006 7:35:04 AM
:
Can we use this feature for ASP.NET 1.1? This does not seem to be working for ASP.NET 1.1
#
ASP.Net 1.1
posted by
Manish Pathak
on
4/16/2007 9:48:42 PM
:
What shall we do to achieve the same result in ASP.Net 1.1 ?