Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

msdeploy

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!

like image 532
Iswanto San Avatar asked Sep 23 '13 08:09

Iswanto San


People also ask

What is WDeployConfigWriter used for?

- WDeployConfigWriter, which has Write permissions to the IIS server's applicationHost. config. This is used by delegation rules for createApp, appPoolNetFx and appPoolPipelineMode.

How do you check Webdeploy is installed or not?

Is Web Deploy installed? You can verify web deploy is installed by going to the "Programs and Features" control panel and looking for "Microsoft Web Deploy 2.0" in the list of installed programs. If it is not there, you can install it via the Web Platform Installer by going to the "Products" tab.

What is Webdeploy?

The Web Deploy is a tool for simplifying migration, management and deployment of Web applications, sites and servers. It can be used to package a Web site, automatically including content, configuration, certificates and databases. It can be used to synchronize between IIS 6.0, IIS 7.


2 Answers

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!
like image 51
fiat Avatar answered Oct 09 '22 23:10

fiat


The easiest fix to this problem is:

  • Computer Management ->Local Users And Groups -> Users
  • Right click -> properties on WDeployAdmin
  • Uncheck "User must changed password at next logon
  • Check "Password never expires"
  • Do the same for WDeployConfigWriter
  • Done!

Similar to @fiat solution, but you don't really need to change the password.

like image 56
randoms Avatar answered Oct 09 '22 23:10

randoms