14

When using msdeploy and the msdeploy.axd handler any attempts to deploy to my remote server is met with a 401 not authorized error and the server logs

IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED

Only Windows Administrators are allowed to connect using a server connection. Other users should use the 'Connect To Site or Application' task to be able to connect.

Process:WMSvc

What is the correct way to target the axd for the site level?

Chris Marisic
  • 32,487
  • 24
  • 164
  • 258
  • 1
    How do you resolve this issue when you've done the steps below and still receive the error provided in the initial question? – frogstarr78 Aug 18 '11 at 21:15
  • @frogstarr78 I always install web deploy from the x64 binary, I've seemed to have had issues with web installer not doing something right. – Chris Marisic Aug 23 '12 at 18:21

3 Answers3

10

This might depend on how you're specifying the connection on the client side as well - if you're using msdeploy.exe you would specify the computername argument including a "?site=" query so that you connect at that site level rather than the server level, for example:

msdeploy.exe -verb:dump -source:iisapp="siteName",computername=https://servername:8172/msdeploy.axd?site=siteName,username=user,password=pass,authType=basic [-allowUntrusted]

krolson
  • 186
  • 1
  • 3
6

If you use Web Deploy Tool 2.0 you can use IIS Manager UI to enable non-admin users to deploy website:

  1. Start IIS Manager
  2. Right-click the site you want to publish to, click Deploy and then click “Configure Web Deploy Publishing...”

IIS Manager Web Deploy Publishing

When you click Setup button Web Deploy grants necessary permissions to selected user. You can discard generated file.

See Announcing Web Deploy 2.0 Refresh!

Pavel Chuchuva
  • 22,633
  • 10
  • 99
  • 115
5

If you're using WMSvc, I'm assuming this is IIS7 ...

If so, then you can deploy with a normal account but you have to make sure these 3 criteria are met:

Your account needs to have: 1 IIS Manager permission for the site/app you are trying to connect with. 2 A delegation rule for msdeploy, that states that you are allowed to do ContentPath operations. 3 Actual filesystem/ACL access to the files.

Russ Clarke
  • 17,511
  • 4
  • 41
  • 45
  • I'm not sure if this is the answer but since you took the time to answer my question I'll give you the bounty instead of letting it expire. I'll follow up if this solved my issue. – Chris Marisic Jun 01 '10 at 12:06
  • Could you please add some details about how to add a delegation rule? – Damian Powell Jul 06 '10 at 08:59
  • A default set of delegation rules are now added during Web Deploy install (v2.1 and up). If you are creating delegation rules by hand there's an example/walkthrough here: http://blogs.iis.net/krolson/archive/2009/11/12/delegate-application-creation-for-non-admininistrator-accounts.aspx – krolson Sep 20 '12 at 22:18