Friday, January 3, 2020

IIS Web Deploy issue - Microsoft.Web.Delegation.DeploymentAuthorizationException

When trying to deploy a web application through Web Deploy, it failed with the following exception message:

Microsoft.Web.Delegation.DeploymentAuthorizationException: Not able to log on the user '.\WDeployConfigWriter'

The strange thing was that it had worked before. So what had changed?

The problem is that the Web Deploy installer creates users with expiring passwords that are used to elevate permissions during deployment.

To fix it we had to change the password settings for the WDeployAdmin and WDeployConfigWriter accounts:

  • Go to Computer Management ->Local Users And Groups -> Users
  • Right click  on WDeployAdmin and choose Properties
  • Uncheck “User must changed password at next logon”
  • Check "Password never expires"
  • Click on OK.

Do the same for WDeployConfigWriter.