app_offline.htm file does not work

Talon picture Talon · Aug 6, 2013 · Viewed 15.9k times · Source

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.

Answer

Daniel picture Daniel · Oct 15, 2013

I recently had the same issue with the app_offline file and the real problem I had was that windows was set to hide known file extensions. So when the file app_offline.htm was created I thought that the name was correct, but windows was hiding the extension .txt.