Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

app_offline.htm file does not work

I have been battling with this for ages now but I just can not get it to work.

Every blog/site I have been too says there is nothing you need to do in IIS but this cannot be correct as there are multiple website configurations such as Application, virtual directory, simple php/asp websites, vitual.

Can someone please explain to me what the setup needs to look like in IIS7.

I have:

  • Checked the file spelling: app_offline.htm
  • Made sure the file was at least 512 bytes (saw this on a random site)
  • Made sure it is in fact in the root of the application/website
  • Checked that I can browse directly to the file
  • Made sure the application pool framework was set to v2.0 or v4.0
  • Made sure the above application pool was assigned to my website
  • Tried this in a new website in IIS where the app_offline.htm was the only file in the root.

I have multiple websites set up that I have tested with, namely:

  • MVC3 Web Application
  • PHP Simple Website
  • Classic ASP Simple Website
  • Webforms Website
  • Webforms Application
  • Virtual folders in the above sites
  • Applications within the above sites

All of the above are working, and placing the app_offline.htm does absolutely nothing.

Please can someone provide some clarity.

like image 487
Talon Avatar asked Aug 06 '13 12:08

Talon


People also ask

How does App_offline HTM work?

The App Offline file ( app_offline. htm ) is used by the ASP.NET Core Module to shut down an app. If a file with the name app_offline. htm is detected in the root directory of an app, the ASP.NET Core Module attempts to gracefully shut down the app and stop processing incoming requests.

Where do I put app<UNK>Offline htm?

Typically, in IIS and ASP.NET, you accomplish this by placing a file named App_offline. htm in the root folder of the IIS website or web application.


1 Answers

I was also struggling a little bit with this issue.

Along with the fore-mentioned criteria in the other answers. It turns out that the file type MUST be specified specifically .htm NOT .html.

like image 130
Michael Avatar answered Sep 21 '22 09:09

Michael