Azure App Service Blank page after Deployment


Site Under Construction error after Deployment




Issue:
  • After deployment when you try to access the function app/web app you get blank screen.
  • You can see only one message “Site Under Construction”.
  • You didn’t do anything for this and was not sure why this message was appearing.



Solution

I observed this message is set in <title> tag of html page which function app is responding when I call the URL.


Now to explain this issue in more details I would like to explain the concept of app_offline.htm file which is the part of your deployment process.
In an effort to make Kudu deployments avoid file locking issues, Kudu will now create a temporary app_offline.htm in the site's WWWROOT folder before starting the deployment. Kudu then takes care of deleting the file after deployment is complete.
The effect is that while deployment is happening, the app will be kept offline. In addition to avoiding file locking issues, this helps keep the site is a consistent state, by not serving any traffic while the contents of the site is only half-deployed.
Note: the file will only be created if an app_offline.htm file is not already present in the site's folder.
If you'd like to turn this behavior off, please add an SCM_CREATE_APP_OFFLINE App Setting to your app and set the value to 0. For more information about configurable settings, please check this page.

You can get more information on below URL,

To get the final confirmation of this I tried to access this file from app and got the same response.(please check the URL in below screen shot)



That mean App has app_offline.htm file available in WWWROOT folder which was showing when calling the function app.

Ideally this file should have been deleted when your deployment is successful but I observed some unsuccessful deployment and that files was not deleted.

To resolve this,
  • Delete the file and try again “or”
  • Redeploy your application and make sure it is successful.

Feel free to add/update anything if needed.

No comments:

Post a Comment