94

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.

1
  • 1
    If you're coming to this question more recently, please see the most recent answer Commented Feb 27, 2015 at 15:48

5 Answers 5

223

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/

Sign up to request clarification or add additional context in comments.

6 Comments

If the passwords have not been changed, you can simply set the accounts WDeployConfigWriter and WDeployAdmin to "User cannot change password" and "Password never expires". In our case "The specified account's password has expired." was in the Security log on a new server install.
Nice. This was the issue in my case. I set the WDeployConfigWriter user's password not to expire and this solved the issue.
I was able to find a similar error in the event viewer (on Server 2012 in Applications and Service Logs >> Microsoft Web Deploy). Error shows in the details as: Microsoft.Web.Delegation.DeploymentAuthorizationException: Not able to log on the user '.\WDeployConfigWriter'. ---> System.Runtime.InteropServices.COMException: The password for this account has expired.
Still at Feb 2016, i encountered this weird problem on windows server 2008R2 and your solution worked for me.
I can confirm you do NOT need to change the password. Setting "password never expires" is enough to fix the problem without the extra steps, as per @GoClimbColorado's comment
|
52

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.

3 Comments

Your advice helped me a lot. I found and executed this script "AddDelegationRules.ps1" with "poverShell". I am use 2012 r2 win server and VS2017.
The only working answer for me - using IIS manager users instead of windows users. No any of the password-related sugesstions worked but this one solved it. Thanks!
Great answer, worked for hours when a simple command fixed my issue.
14

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.

3 Comments

Just used this answer to solve this myself. There was one more step for me though... Once you've reset the credentials, you need to go into IIS > Management Services Delegation then select each rule and press Edit. If the rule uses the WDeployConfigWriter account, press the Set... button and re-enter the new credentials you just updated.
This is really only a half answer... to prevent the passwords from expiring, open the local group manager (run lusrmgr.msc), users (in the sidebar), double click the account name, and tick "password never expires".
I was able resolve this by simply unchecking the User must change password at next login and did't physically change the passwords
6

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.

1 Comment

I had it checked, but have problem with deploy
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.