14
votes

I configured releases same way for a couple of our servers but I have issue with one of them (others work perfectly):

[error]Failed to deploy web package to IIS website.

[error]Error: C:\vstsagent\A2_work_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.0.20\MSDeploy3.6\msdeploy.exe failed with return code: 2148734720

Unfortunately I can't find anything helpful related to this error Code.

My release configuration:

  1. IIS Web App Deploy (Preview)

  2. Deployment group with one specific staging server (I'm using on-premise agent)

  3. Website name: correct name of my website in IIS

  4. Virtual Application: empty field

  5. Package of Folder: zip chosen from build drop artifacts

  6. Selected "XML variable substitution"

  7. Selected "Remove Additional Files at Destination"

What I've already tried with no luck:

  • manually turn of application

  • delete all files in application folder

  • changing user account to use for the service

Again - same configuration for other servers works fine.

Servers configuration: Windows Server 2012R2 Standard x64

1
Set system.debug variable to true, then queue build and post the detail log here.starian chen-MSFT
Thx, starain! Here is detailed log: pastebin.com/VZBVHZQhkopieczek.dev
Base on the log, there is the error log file C:\vstsagent\A2_work\r1\a\error.txt, post it here. If the file will be deleted after building, you can add Copy Files task to copy it to other folder.starian chen-MSFT
I can't find that file. Please notice this is release definition (build is going well). Is there any way to copy this error.txt before it is deleted? [error]Failed to deploy web package to IIS website. [debug]Processed: ##vso[task.issue type=error;]Failed to deploy web package to IIS website. [debug]{} [debug]System.DefaultWorkingDirectory=C:\vstsagent\A2_work\r1\a [debug]rm -rf C:\vstsagent\A2_work\r1\a\error.txt [debug]removing file [debug]task result: Failedkopieczek.dev
Logon agent machine and try to open it manually before be deleted.starian chen-MSFT

1 Answers

23
votes

Looks like I figured it out. .NET Framework 3.5 was missing on my server...

I was investigating logs and I found out that below line is causing failure.

"C:\vstsagent\A2\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.0.20\MSDeploy3.6\msdeploy.exe" -verb:sync -source:package='C:\vstsagent\A2\_work\r2\a\temp_web_package_8269135298977384.zip' -dest:auto -setParam:name='IIS Web Application Name',value='httproot'

So I copied it to CMD and got proper Windows message when I tried to execute it.