Wednesday, April 18, 2007

Disabling a Website with App_Offline.htm

I came accross a cool future in .NET 2.0... It is an alternative technique for indication that an ASP.NET application is unavailble. If you place a file called App_Offline.htm in the root of the website, all requests to this site will return the content of this html-file instead. You can place any static content in this file.

If you place a file called App_Offline.htm in the root of the website, it will cause the application domain to recycle. The same will happen when you remove the file. The application domain will also recycle if you edit the file, in the same way that a application will recycle when you edit web.config

0 comments: