Hi guys :)
I have my own app_offline.htm file in the repo. How do I get the CI-pipeline task to use this?
Thanks.
Best regards
Thomas
Hi guys :)
I have my own app_offline.htm file in the repo. How do I get the CI-pipeline task to use this?
Thanks.
Best regards
Thomas
Hi @ThomasNrgaard-9386 ,
Thanks for using Microsoft Q&A. I believe your scenario can be achieved using MS deploy but comes with some limitations as stated below:
App offline file should exist in the destination server and need to provide relative path.
Destination provider types are limited (we set dest:auto for MSBuild package, which doesn't support custom app offline feature).

You can also upload the custom app_offline, deploy the package and then remove the uploaded custom file after deployment following these steps:
To deploy an App_offline file to a destination IIS website, you need to invoke MSDeploy.exe using the Web Deploy contentPath provider. The contentPath provider supports both physical directory paths and IIS website or application paths, which makes it the ideal choice for synchronizing a file between a Visual Studio project folder and an IIS web application. To deploy the file, your MSDeploy command should resemble this:
msdeploy.exe –verb:sync
-source:contentPath="[Project folder]\App_offline.template.htm"
-dest:contentPath="[IIS application path]/App_offline.htm",
computerName="[Destination web server]"
To remove the file from the destination site at the end of the deployment process, your MSDeploy command should resemble this:
msdeploy.exe –verb:delete
-dest:contentPath="[IIS application path]/App_offline.htm",
computerName="[Destination web server]"
Hope that helps!
Best,
Grace
14 people are following this question.