We host our ASP.NET web sites internally (within our DMZ). When we are doing network maintenance, etc we would like to have our sites display a maintenance page, but our network is down so our hosting servers are off. We don't host our DNS entries (it is handled externally) so we could have a maintenance page hosted externally, but pushing a DNS change for maintenance would take too long. What kinds of solutions could we employ to handle network outages here while still giving our external users some indication that we still exist? What has worked for you and what have you tried?

6 Answers 6


An offsite reverse proxy that points to your live site could display a default page when the backend site is not available.


I use haproxy for this exact setup. It is hosted on an external Linux VPS. When the proxy system is able to successfully get the health check page on the actual web server, that's what is served to the client. When the health check fails, it serves a static page from an Apache server local to the proxy VPS.

Here is my haproxy.conf:

maxconn 4096
mode http
clitimeout 60000
srvtimeout 30000
contimeout 4000
option httpclose # Disable Keepalive

listen FarmName
        mode http
        stats enable
        stats auth admin:Fa2a6eSe
        balance roundrobin
        cookie haCookie insert nocache
        option httpclose
        option forwardfor
        option httpchk HEAD /healthcheck HTTP/1.0
        server active check
        server static-backup check inter 500 rise 1 fall 2 backup

Well, I don't know if this the optimal solution, because it is adding complexity to your solution: you could place some reverse proxies (squid, MS ISA, ...) in front of your web servers (outside your network) and run the requests through these servers.

So, when you're planning for down-time, you simply have to change some rules to show the static "sorry, we're offline" message.


You could set up a DNS failover solution (DNS Made Easy provides this option), but depending on your TTL settings, people won't likely get the updates except for longer outages. Of course, you would also need an external server to host the maintenance page.

Your best bet for instantaneous failover is to purchase a small hosted server somewhere, with a static web page on it, and then use a tool (like heartbeat in linux) to monitor when the main server is unavailable, and have the secondary server take over its IP address.


Why not just provision a single workstation/server with IIS displaying a single static maintenance page? When you need to bring the web servers down you just bring up the maintenance workstation and make sure it responds to the incoming web requests...

Due to the simple static web page you could probably get away with a small/medium workstation, even perhaps a laptop... You could probably even get away with a Virtual Machine that sits offline until you need it...

Seems like everything else is more work than necessary...


If you have an ASP.NET web application site, and you place a text file named "app_offline.htm" in the root of the site, all requests to that website will redirect to that app_offline.htm file.

Basically, if you need to take an entire ASP.NET site offline, you can place some nice message in that file. Then, any new requests to a URL, any URL, in that website will redirect to that file allowing you to do maintenance to the site, upgrades, or whatever. It is not really a redirect though. ASP.NET essentially shuts down the site, unloads it from the server, and stops processing any requests to that site. That is, until you delete the app_offline.htm file - then things will continue as normal and your ASP.NET site will load up and start serving requests again. 

Hope it helps. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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