简体   繁体   中英

Azure App service cannot publish from visual studio 2019

I have the following error trying to pubblish on Azure App Service on a non-production deployment slot:

2>Start Web Deploy Publish the Application/package to https://appservicename-preprod.scm.azurewebsites.net/msdeploy.axd?site=appservicename__preprod ...

2>Adding ACLs for path (appservicename-preprod) 2>Adding ACLs for path (appservicename-preprod)

2>Updating file (appservicename-preprod\bin\Antlr3.Runtime.dll).

2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets(4284,5): Error ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER: Web deployment task failed. (Unable to perform the operation ("Create File")
for the specified directory ("D:\home\site\wwwroot\bin\Antlr3.Runtime.dll"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER . Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER. )

2>Publish failed to deploy.

I'm owner of the subscription where the app service is hosted. If I try to access via FTP I see the wwwroot empty but from VS on Cloud Explorer under the appservicename/Deployment Slots/appservicename-preprod/Files I can locate the files. If I try to publish a zip file on KUDU Zip Push Deploy it returns me the error at 50%: [object Object] - Error while calling ZipDeploy.

Any suggestions?

You should create it using publish Profile , it has all the necessary details for deployment:

  • In the Azure portal, open the Azure App Service.

  • Go to Get publish profile and save the profile locally.

    在此处输入图像描述

  • On the computer where you have the ASP.NET project open in Visual Studio, right-click the project in Solution Explorer, and choose Publish .

  • If you have previously configured any publishing profiles, the Publish pane appears. Click Create new profile .

  • In the Pick a publish target dialog box, click Import Profile .

    在此处输入图像描述

  • Navigate to the location of the publish settings file that you created in the previous section.

  • In the Import Publish Settings File dialog, navigate to and select the profile that you created in the previous section, and click Open .

    Visual Studio begins the deployment process, and the Output window shows progress and results.

  • If you get an any deployment errors, click Settings to edit settings. Modify settings and click Validate to test new settings. If the host name is not found, try the IP address instead of the host name in the Server and Destination URL fields.

    在此处输入图像描述

remove WEBSITE_RUN_FROM_PACKAGE from azure appservice>Configuration>Application Settings

if u ever linked ur appservice to devops or github then fist disconnect that too. Appservice(ur app)>Deployment Center>check the linked

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM