Bookmark and Share

Instantly stop an ASP.NET web application

Posted on Thu 30 April 2009

Through this relatively unknown simple technique, you can instantly take down a .NET web app so you can do maintenance etc.

Simply put a file called App_Offline.htm in the root of the web server and .NET will detect it, and stop processing any requests. All it will do instead is serve the contents of this file - great for doing site maintenance whilst showing a friendly message to the user.

One thing to bare in mind is the fact that it needs to be at least 512 bytes in size otherwise you will get a page not found error in IE. (Just add in a whole load of comments to bulk up the size if need be).


Permalink | Comments (0)
Tags: , . Categories: ASP.NET.

Comments

Comments

Add a comment

Name, e-mail and your comments are all required fields

biuquote
Loading



< go back to the main blog page

< go up to the top of the page