WebDeploy - Not able to log on the user '.\WDeployConfigWriter'

Iswanto San picture Iswanto San · Sep 23, 2013 · Viewed 14.6k times · Source

I have problem with MsDeploy to publish my website to remote IIS from Visual Studio.

I encountered the following error:

Microsoft.Web.Delegation.DeploymentAuthorizationException: Not able to log on the user '.\WDeployConfigWriter'. ---> System.Runtime.InteropServices.COMException: The user name or password is incorrect. (Exception from HRESULT: 0x8007052E) --- End of inner exception stack trace --- at Microsoft.Web.Deployment.LogonUserHandle.LogonUser(String userName, String domain, String password)

I tried to change WDeployConfigWriter's password in Local Users and Groups (lusrmgr.msc). Then, I open Management Service Delegation. I try to set credentials in edit rule for WDeployConfigWriter page and it's always fail with message "The spesified password is invalid. Type a new password".

I am working in Windows Server 2012.

Any help would be appreciate. Thanks!

Answer

fiat picture fiat · Feb 19, 2014

I had this too but with a slightly different detail

Not able to log on the user '.\WDeployConfigWriter'. 
Logon failure: the specified account password has expired. 

Full credit to this blog, the problem is that the Web Deploy installer creates users with expiring passwords that are used to elevate permissions during deployment. The fix is to:

  1. Use server manager on the accounts WDeployAdmin and WDeployConfigWriter to
    • reset the password
    • check password never expires
    • uncheck user must change password next logon
  2. Use IIS -> Management Service Delegation to reset the passwords for the rules where those accounts have been configured to elevate to a specific user
  3. Fixed!