Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Web Deploy 3.0 with a non-admin account

I'm trying to deploy an ASP.net MVC Web Site using a non-administrator account (with Web Deploy 3.0). According to all the videos and documentation I've seen this is possible. However, when I try to deploy I get an error (ERROR_USER_NOT_ADMIN).

I have added the user under "IIS Manage Users" on the server. This user exists on the site under "IIS Manager Permissions".

What am I missing?

Here is the pubxml:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>MSDeploy</WebPublishMethod>
    <SiteUrlToLaunchAfterPublish>http://sitename.com/</SiteUrlToLaunchAfterPublish>
    <MSDeployServiceURL>http://server.com</MSDeployServiceURL>
    <DeployIisAppPath>IISsitename</DeployIisAppPath>
    <RemoteSitePhysicalPath />
    <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
    <MSDeployPublishMethod>RemoteAgent</MSDeployPublishMethod>
    <UserName>user</UserName>
    <_SavePWD>True</_SavePWD>
    <PublishDatabaseSettings>
      <Objects xmlns="">
      </Objects>
    </PublishDatabaseSettings>
  </PropertyGroup>
</Project>

http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes#ERROR_USER_NOT_ADMIN

ERROR_USER_NOT_ADMIN Diagnosis - This happens if you try to connect to the Remote Agent Service but have not provided appropriate administrator credentials. Resolution - The Remote Agent Service accepts either built-in Administrator or Domain Administrator credentials. If you have a non-domain setup and want to use account other that built-in administrator, please do following: Create a separate user group MSDepSvcUsers on remote computer. Create an local account A on both local & remote computer. Add A to MSDepSvcUsers on remote computer. Use account A to publish, this will allow you to publish without needing to use built-in > admin account.

like image 377
Ryan Langton Avatar asked Mar 06 '13 17:03

Ryan Langton


People also ask

Is Microsoft web Deploy free?

Microsoft Download Manager is free and available for download now. The Web Deployment Tool simplifies migration, management and deployment of IIS Web servers, Web applications and Web sites. Note: There are multiple files available for this download.

What is Microsoft web Deploy v3?

Overview. 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.

How do I Deploy a web deployment package?

Create a web deployment package using the MSBuild command line, Team Build, or Visual Studio 2010. Copy the web package to the destination web server. Use the Import Application Package Wizard in IIS Manager to install the web package and provide values for variables like connection strings and service endpoints.


1 Answers

I think you also need to use the management service delegation feature in iis to create delegation rules for the user that you are deploying as.

See part 2 of this article

http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler

like image 144
Rik Leigh Avatar answered Nov 15 '22 08:11

Rik Leigh