I am in the course of setting up continuous deployment to IIS using TFS 2015 RM and wanted to take an application offline before deployment. Upon little research have found good posts on achieving it through “app_offline.htm” file with following steps.
- Creating an “app_offline.htm” file in the "root" of the website but with a different name (app_offline.htm_) to avoid debugging or related problems.
- Before deployments, rename the file back to “app_offline” and place it in the destination web app.
- Post deployment, we delete the file from destination web app.
Currently, I have included the “Windows Machine File Copy” task to copy build binaries along with “app_offline.htm_” to destination web app and “Delete Files” task to delete it post deployment.
Now, All I want to understand is how to rename the file back to app_offline.htm before deployment. Help on this would be greatly appreciated!
There are many ways to do it: