How to use msdeploy and target a specific site?

一世执手 提交于 2019-12-21 03:32:20

问题


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?


回答1:


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

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!




回答2:


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]




回答3:


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.



来源:https://stackoverflow.com/questions/2874939/how-to-use-msdeploy-and-target-a-specific-site

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!