The original contents of app_offline.htm are indeed stored in a mystery location (probably hard-coded inside of one of the binaries), however Visual Studio does write the contents to a physical file before uploading it. I know this question is old, but I hope this helps others coping with this issue. The advantage is (over replacing the system copy) is that your own copy is portable, is automatically solution-specific, and works with source control. The publishing process automatically deletes the app_offline.htm from the remote server irrespective of its content or origin. Therefore the (ugly) system generated copy of app_offline.htm might be served to requests within a 1-2 second window of initiating the publish, before being updated with your custom file. This means that your custom app_offline.htm file quickly (but not instantly) overwrites the system generated file. However, the only drawback is that during the publishing process, the default generated app_offline.htm file is copied first, then the solution files in what appears to be in/near alphabetical order. I have tested this method, using Visual Studio 2015, and it does indeed work. An easy solution that many might find suitable involves simply adding your own file also named "app_offline.htm" to your solution.
0 Comments
Leave a Reply. |