Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider you have a website with many virtual directories. Each VD is configured as an application.

How would you, in effect, turn off just ONE of those VD, or have it redirect to another page? You want to be sure that you don't turn off the entire site and all the other VD.

The scenario here is that there is a downtime or deployment happening, and you would like to redirect to an app_offline.htm page.

Question: How would you go about temporarily disabling just one virtual directory?

share|improve this question
up vote 8 down vote accepted

If your virtual directory is a separate ASP.NET application, you could put a HTML file with the name


in the folder the virtual directory is associated with. The file must have a minimum length of 512 bytes and should contain the HTML you want to show to your website's visitors.

This will cause every request to that application to show the app_offline.htm page. See this blog post (Scott Guthrie).

share|improve this answer
Note: I wrote the answer before the question was edited adding the "app_offline.htm" part. :-) – splattne Jul 27 '09 at 13:19
Brilliant! I wasn't aware of app_offline.htm -- you just solved a very similar problem for me :-) – Chris_K Jul 27 '09 at 13:20
Thanks splatt. I think the app_offline bit in there on rev.1. You did help with the important configuration of the VD being an application. Thank you very much! – p.campbell Jul 27 '09 at 13:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.