Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use IIS app_offline.htm file with Azure

I have a brilliantly designed app_offline.htm file that I'd like to display on my site periodically when I'm doing things like backing up the DB. On a server with a real file system, this wouldn't be a problem: I'd just copy app_offline.htm to the my app's root, and IIS will work its magic and redirect all requests to this file.

However, I'm using Azure, so there's no real file system and there's no easy way move files around from one location to another.

How I can I make app_offline.htm play nicely with Azure?

like image 283
Armchair Bronco Avatar asked Jun 06 '11 15:06

Armchair Bronco


People also ask

How to use app_ offline htm?

To do this, you need to create a temp file, name it “app_offline” with “. htm” extension, load it into the root directory of the application, unload the content of the application from the server and remove the “app_offline. htm” file after loading the application back to the server.

Where is App_offline htm?

Make sure that app_offline. htm is in the root of the virtual directory or website in IIS. Show activity on this post.


1 Answers

I figured I'd add this, I haven't seen it mentioned yet. You can actually do this via web publish from Visual Studio (or WebMatrix) as well, just put app_offline.htm in the root of your project - the same level as your main web.config. When done, just rename it and redeploy to go back online. 2 clicks - easy.

The manual option is to drop it into your /site/wwwroot via FTP.

A little personal secret, none of your site files will be accessible, style sheets etc. So put your includes into an azure blob container, and viola.

like image 148
dsghi Avatar answered Oct 11 '22 11:10

dsghi