Pero P.
Pero P.

Reputation: 26982

All but first deployment of Orchard CMS to Azure Web Apps Fails

In Visual Studio Online I have a scripted build that builds Orchard 1.9.1 from source then, using the Azure Web App Deployment task, deploys the compiled Web Deploy Package to Azure.

The first deployment to a fresh Web App instance works great and the system functions as expected. However, any subsequent deployment to the same Web App fails with:

Unable to perform the operation ("Delete File") for the specified directory ("HtmlAgilityPack.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.

The file specified in the error can be different, but the deployment fails consistently. The link in the error isn't of much help as the implementation details covered (IIS, root folder etc) are abstracted away in an Azure Web App.

Where should I look to fix this permissioning issue?

I went with the default build template for Azure Website when creating the build, details of which are below for info:

Build Step: enter image description here

MSBuild Arguments:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true 
/p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.stagingDirectory)"

Azure Web App Deployment step: enter image description here


Pertinent information for the build log:

2015-09-28T05:36:22.7928424Z Package= C:\a\d8c9303e\staging\Orchard.Web.zip     
2015-09-28T05:36:22.7938416Z Slot=      
2015-09-28T05:36:22.7938416Z AdditionalArguments=      
2015-09-28T05:36:22.8028415Z packageFile= Find-Files -SearchPattern C:\a\d8c9303e\staging\Orchard.Web.zip     
2015-09-28T05:36:22.8198428Z packageFile= C:\a\d8c9303e\staging\Orchard.Web.zip     
2015-09-28T05:36:22.8258420Z Get-AzureWebSite -Name **** -ErrorAction SilentlyContinue     
2015-09-28T05:36:28.4361621Z Publish-AzureWebsiteProject -Name "****" -Package "C:\a\d8c9303e\staging\Orchard.Web.zip"     
2015-09-28T05:36:33.8798112Z ##[error]Unable to perform the operation ("Delete File")  for the specified directory ("HtmlAgilityPack.dll"). This can occur if the server administrator has not authorized this operation for the user credentials you are using.     
2015-09-28T05:36:33.8818107Z ##[error]  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER.

Upvotes: 0

Views: 501

Answers (1)

Use the provided Orchard.proj msbuild script using the Precompiled target.

Upvotes: 1

Related Questions