Mariusz, Gorzoch tech Blog

How nicely tell users that our app is under maintenance

leave a comment »

Did you ever fight with this issue ? Did you boss ever ask you if you can do something about this strange 404 Error : Page not found, when you are upgrading you application to new version ? Here I have solution for you. I discovered this today, when I was publishing my asp.net app from visual studio. During publish time I pressed in the browser refresh button and then get a strange info “Page is unavailable, please remove “app_offline.htm” file from root directory”. I say… woow… 🙂 So, the answer on this request from your boss, mom, or whoever is simply put “app_offline.html” file to root directory of you app and this will let IIS to redirect all request from the user to this file. During this time you can do whatever you want with your app and no one will disturb you.

Take a look:

1. IIS without “app_offline.htm” file

2. After adding file to root directory of the site and restarting IIS

in addition, what I really like about it is, that it doesn’t meter what you type inside query string as long it point to you IIS app. All files requested by the user are redirected to this particular html file, for example:

http://mgodevstation:8080 – redirected to –> http://mgodevstation:8080/app_offline.html

http://mgodevstation:8080/default.aspx – redirected to –> http://mgodevstation:8080/app_offline.html

http://mgodevstation:8080/blablablablablababla.aspx  – redirected to –> http://mgodevstation:8080/app_offline.html

Hope that upgrade of your app will be nicer next time.


Written by Mariusz Gorzoch

15 September 2009 at 10:01

Posted in Bez kategorii

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: