1

I have a .NET MVC Website that gets automatically deployed based on a GIT repository checkin. (Azure Dev ops Pipeline)

When the website is being deployed, if I got to the website URL. I get a blank page with a "Site Under Construction title" page. After the deployment is complete, this page goes away and I see my site.

What I want to know is how can I customise this Under construction page. If I add a app_offline.htm file in the root of my visual studio project. I seem to see this file when deploy is happening, but when its finished, the file is still there, and I can't see the site.

Do I need to make a change to my build pipeline somehow? or make a change to my web-app configration?

What do I need to do to have this file displayed only during the deployment.

Ayo Adesina
  • 2,231
  • 3
  • 37
  • 71

1 Answers1

0

UPDATE

1. Invoking MsDeploy.exe manually in a Azure Devops

2. App_Offline in MSBuild Remote Web Deploy

PRIVIOUS

You can configure it in .pubxml file. That is actually used to take your app offline while deploying. After finishing deployment, MSDeploy tool should delete APP_OFFLINE.html automatically.

<PropertyGroup>
  <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
  ...
</PropertyGroup>

Related posts:

1. Automatize App Offline in Azure App Service and Visual Studio

tlejmi's answer is very detailed.

2. How to take web app offline while publishing?

3. Getting site under construction message after azure webapp deployment

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • When you say configure in .pubxml where do I need to put that file? I'm not using MSDeploy, I am deploying with a azure dev ops... pipline – Ayo Adesina Feb 05 '21 at 10:09