App_offline not being respected?

I am doing some tests with application deployment using the app_offline.htm function in asp.net. I found that if I have a working application and I put the app_offline.htm file in the root directory and then rename the \ bin folder, my app_offline.htm file will not be displayed. If I rename the bin folder back to "bin", my app_offline.htm file will display as expected. I assumed / thought that the presence of app_offline will replace everything else that happens ... am I mistaken? This applies to Windows 7 / IIS 7.5.

+5
source share
3 answers

It is possible that your application is rebooting / recompiling because you are messing with the bin folder. I found this blog post helpful: http://blog.kurtschindler.net/more-app_offline-htm-woes/ . I also tried making app_offline.htm the first default document for the site and found that to fix any problems with the rebuild of YSOD.

+1
source

If I were to guess, I would say that changing your / bin (in this case, the change that was removed) launches IIS to recycle your application. app_offline.htm stops this due to changes and deletions of content, but does not delete the bin / bin directories. I would suggest that you see this behavior if you rename the directory rather than delete it.

0

Check the .net version for the application pool. app_offline.htm is only supported in version 2.0 and higher. If the application pool is running .net 1.1, it will not work.

0
source

All Articles