Iis – Redirect to another web server if current page is down

hostingiisnameserver

I have written an application in Razor/Asp.net and I'm hosting it on our W2008R2 under IIS 7.5.

At times we will need to bring down this web server so it will be not accessible to our clients. I need a way to show that the server is under maintenance and will be back up shortly or x amount of time.

I was wondering if this would work:

add a 3rd and 4th nameserver to godaddy where we have the domain and if the iis server is not responding, would it go to the (2nd hosting site) 3rd and 4th nameservers by default?

I could put a 'server down for maintenance' on that host to catch when the server is not available.

Is the way I'm thinking this works the way it actually works?

If not, any suggestions how to direct them to another host if the current one is down for maintenance?

Best Answer

The way this is done for a lot of web apps is to create a flag file when the site is in maintenance mode. A file, which is normally included in all other page files, looks for that file and either sends the user to the main site or to a "this site is in maintenance mode" type of page if the flag does exist. Simply delete the flag file to restore the system to normal operation.

Related Topic