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).

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

4,505 Spam Comments Blocked so far by Spam Free Wordpress

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>