How to fix "Central Directory Corrupt" in Azure App Service VS Code deployment

Cole Snyder 15 Reputation points
2023-05-03T15:19:11.41+00:00

I have an Angular app that I've deployed to azure using the VS Code extension "Azure App Service". It has worked previously, but now when I try to deploy it says "Central Directory Corrupt". The only reason I can think of for why this is happening is because I manually updated a file using Kudu.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,175 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
815 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 23,731 Reputation points Microsoft Employee
    2023-05-04T22:20:59.08+00:00

    Thanks for posting this question, while I’m checking on this,  the Central Directory Corrupt error typically occurs when there is an issue with the ZIP file that you are trying to deploy. This can happen if the ZIP file is corrupted or if there is an issue with the file structure.

    Just to highlight, when using GitHub Actions, Azure Pipelines or ZipDeploy, Oryx is not enabled by default. If you prefer to enable App Service Build Service (Oryx) you may add a App Setting SCM_DO_BUILD_DURING_DEPLOYMENT= true and redeploy.

    When using Local Git, Bitbucket or External Git, Oryx is enabled by default.

     

    When you deploy a ZIP package, App Service unpacks its contents in the default path for your app (D:\home\site\wwwroot for Windows, /home/site/wwwroot for Linux). Please check this doc.

     
    I understand you have manually updated a file using Kudu, just to isolate, you may try using the VS Code extension "Azure App Service" to deploy your app instead of manually updating files using Kudu or isolate if the issue confined to nzrdry1.zip file.

    0 comments No comments