Calendar

<<  mars 2010  >>
lumamejevesadi
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

(août 31, 2007 08:54)

Let's imagine you have a standard application deployed in IIS (here, the "MyApp" application). Simply browsing the application will show you the default page content, and you can also access any page of the website.

Now let's imagine you want - for maintenance reasons for example - bring this application offline.
If you stop IIS or your application pool, all your customers will receive an HTTP error, typically a 500 error. Let's imagine you want to have real "maintenance page" whatever the request they will do.
Of course you can change the "default" document in IIS, but if they ask for a specific page, this won't work.

IIS has this feature fully integrated. Simply add a page named "app_offline.htm" in the virtual directory and let's try now several requests, asking either for the virtual directory itself or for any page in the application.

This is pretty cool no ?
Just note that this will work if the client ask for aspx pages. Any other format will be served normally.
Scott Guthrie has also noted that you maintenance page should have a minimal weight otherwise, you would encounter some trouble. Check his blog entry here.


Working another way for maintenance sessions ? Please leave comments !   

Billets liés

Commentaires

août 31. 2007 13:25

Very nice! Smile

Bar Loïc

septembre 6. 2007 02:40

When you running a web application in debug mode,it can arrive that Visual Studio add (after some problem, I believe) automatically the page "app_offline.htm" in your web project.

So, your web application is offline and you ask you: "Why it don't work @#!?".

You must simply exclude or remove this page of your project to find a normal state.



Francois Wullens

septembre 6. 2007 09:11

He he yes indeed François !
In fact Visual Studio use this system itself at least for publishing on IIS. And maybe also for some other features I don't know. So yes it may happen to have this page remaining from time to time

Pierre-Emmanuel Dautreppe

Ajouter un commentaire


 

  Country flag





Live preview

mars 12. 2010 15:35

Powered by BlogEngine.NET 1.2.0.0 | Theme by Pierre-Emmanuel Dautreppe