This post is about a very helpful, yet largely unknown feature of ASP.NET applications hosted in IIS. A built in maintenance mode so to speak. The app_offline page.
If you want to put one of your ASP.NET web apps into maintenance mode, simply create a maintenance .htm page with the markup you want, and name it app_offline.htm. By placing this into the root of your application, IIS will automatically route requests to your app, to this page instead, bypassing your app completely.
I first learned about this from Scott Guthrie (http://weblogs.asp.net/scottgu/426755), in a post that is over 10 years old. Yet, I was surprised that a lot of developers don’t seem to know about this feature, so I figured I would share it as well.
For the most park, it works right out of the box. But if you’re experiencing issues while using this with your MVC app, check out Kurt’s post here: http://blog.kurtschindler.net/app_offline-htm-gotchas-with-asp-net-mvc/