Ryan Gates
Ryan Gates

Reputation: 4539

Permissions necessary to web deploy to IIS site

What permissions are necessary for a user to use web deploy to IIS running on a different server?

When I try to deploy from VS 2010 using that users credentials, I get the below error.

Error   36  Web deployment task failed.(Remote agent (URL https://server:8172/msdeploy.axd?site=site.name.com) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.)
Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.
Error details:
Remote agent (URL https://server:8172/msdeploy.axd?site=site.name.com) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.
An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
The remote server returned an error: (401) Unauthorized.    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets

I am able to use web deploy when I use my domain account (e.g. domain\user) with the following publish arguments.

Publish arguments

My domain account is an administrator on the destination server, but granting the service account full admin privileges is not an option.

Upvotes: 1

Views: 5917

Answers (1)

Ryan Gates
Ryan Gates

Reputation: 4539

The user must have the following permissions.

  • Read/Write permissions on the site folder directory
  • WDeployConfigWriter and WDeployAdmin must be configured to have their password never expire and user cannot change password like the below screenshot WDeployConfigWriter Properties
  • The account that runs the build should be enabled under IIS Manager Users
  • The account that the build runs under must have permissions to the site under IIS Manager Permissions
  • Configure Management Service
  • Configure Management Service Delegation like the below Configure Management Service Delegation

Useful reference

Web Deploy 3.0 infuriating 401 error on publish

The user that the account runs under should be a Power User and must have full control permissions to the folder that the destination iis site is running from.

Upvotes: 3

Related Questions