views:

59

answers:

2

Sometimes we need to do maintenance in the web server.

In the period of time that this maintenance occurs, I want that a user-friendly page be displayed to anyone that tries to access our apps.

I know about the app_offline.htm file. But using this "trick" I would need to put a file per web application in the server, right?

We use IIS 6 and 7, running classic ASP, ASP.NET 1.1, ASP.NET 2.0 and ASP.NET 3.5 apps.

So the question is: Is there a better way of doing this?

+2  A: 

We have a utility app that we can run that goes through all our web apps by taking them online and offline by renaming a file. it's either app_offline.htm (when it's offline) or app_offline.online when it's online.

This process allows us to have a per application app_offline file but an easy way to take all our apps offline and online when we need to take ever thing down. (As in when we're doing maintenance on our mainframe.)

It's a bit of work to get it set up, but worth it. It works for the .Net apps.

For the classic asp apps, we have a similar approach. We have a custom "Not Authorized" (401) page with the same content as one of our application offline pages. To take these offline, we disable to the anonymous web user, so the effect is the same.

David Stratton
Just discussed this great ideia with my internal client, and he added that the server itself will be unavailable, like, totally offline. So the `per application` feature of the `app_offline.htm` file doesn't apply in this context. Thanks for your time!
BrunoSalvino
+2  A: 

Do you have a firewall and/or a proxy in front of your web server(s)? If so, you could setup a rule to send any incoming requests to a separate static "catch-all" maintenance site. Then you just need to turn on that rule during your maintenance period and turn it off when you're finished.

Lance McNearney
Nice! Will check this solution with my IT infrastructure.
BrunoSalvino
Researched a little more about this solution and found an asnwer here in StackOverflow. Thanks a lot! http://stackoverflow.com/questions/756532/strategies-for-showing-a-nice-currently-offline-page-when-the-server-is-down
BrunoSalvino
Yep, lots of solutions in that thread pointing in the right direction. In the end, it's going to really depend on your infrastructure.
Lance McNearney