Web deployment task build failed

Visual Studio-2010

Visual Studio-2010 Problem Overview


Scenario:

I set up successfully TFS2010 webdeploy task for solution. Everything worked fine until suddendly something went wrong in the deployment task.

Solution has 2 web projects..those are configured to deploy on build and publish it to the dev-server.

Does anybody have a knowledge what is wrong in build (information below)?

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
(3847): Web deployment task failed.
((4.8.2011 11:01:10) An error occurred when the request was processed on the remote computer.)
(4.8.2011 11:01:10) An error occurred when the request was processed on the remote computer. Unable to perform the operation. Please contact your server administrator to check authorization and delegation settings.

I can give more information if someone needs it.

Visual Studio-2010 Solutions


Solution 1 - Visual Studio-2010

I encountered the same issue when building via TFS. When I tried to manually import the website I got a more informative error: "not able to log on the user \WDeployConfigWriter".

Turns out that when you install web deploy it sets up two local accounts WDeployConfigWriter and WDeployAdmin. The passwords on these accounts are set to expire. So reset the passwords on the web server and set to "never expire". Then go to Management Service Delegation in IIS. Each of the presented rules has a UserName field. Where it is WDeployAdmin or WDeployConfigWriter right click and update the credentials to the new passwords.

A full explanation with screenshots can be found here: http://workinghardinit.wordpress.com/2011/07/18/wdeployconfigwriter-account-issues-trouble-shooting-web-deploy-2-0-with-lessons-learned/

Solution 2 - Visual Studio-2010

All you have to do is re-run the script "AddDelegationRules.ps1" located in "C:\Program Files\IIS\Microsoft Web Deploy V3\Scripts"

This is the script that is run when web deploy is first installed. It will re-create any missing delegations, re-set the passwords for both WebDeployAdmin and WebDeployConfigWriter, and add WebDeployAdmin back to the Administrators group.

You would still need to set the password on each account not to expire after re-running the script.

Solution 3 - Visual Studio-2010

We had the same issue-- in our case we are only using MSDeploy (without TFS). Resetting the password for those 2 local accounts (WDeployConfigWriter and WDeployAdmin) solved the problem as their passwords had expired. We attempted to change the password policy to never expire, but only a local Administrator can do that.

Solution 4 - Visual Studio-2010

run this command lusrmgr.msc double click on user and double click the account name, and tick "password never expires". enter image description here

enter image description here Done.

Solution 5 - Visual Studio-2010

In my case it was a botched install of Web Deploy.

Uninstalling then re-installing Web Deploy fixed it for me -- Repairing didn't help.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSAVView Question on Stackoverflow
Solution 1 - Visual Studio-2010bucktronicView Answer on Stackoverflow
Solution 2 - Visual Studio-2010WillView Answer on Stackoverflow
Solution 3 - Visual Studio-2010jmazinView Answer on Stackoverflow
Solution 4 - Visual Studio-2010donprecious iyeritufuView Answer on Stackoverflow
Solution 5 - Visual Studio-2010Wildcat MattView Answer on Stackoverflow