使用Web Deploy到远程主机的应用程序池同步

时间:2012-06-20 01:41:33

标签: iis iis-7 webdeploy microsoft-web-deploy

我正在尝试使用IIS凭据

将应用程序池从本地计算机同步到远程服务器

这是我运行的命令

msdeploy.exe 
          -verb:sync 
          -source:appPoolConfig='MyAppPool' 
          -dest:appPoolConfig,
                 computerName='https://remoteserver.com:8172/MSDeploy.axd',
                 userName='WebDeploy',
                 password='Pa$$word',
                 authtype='Basic',
                 includeAcls='False' 
          -enableLink:AppPoolExtension  
          -disableLink:CertificateExtension 
          -allowUntrusted 

但我一直在

Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("dev.dash.exceptron.com") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.

我可以很好地同步现有网站,但我无法创建网站或应用池。我认为它可能与我的用户具有“网站”级别的事实有关,并且应用程序池不适合该级别。

1 个答案:

答案 0 :(得分:0)

发现问题,似乎IIS凭据没有权限做许多任务,使用authtype='NTLM'和Windows用户名和密码修复了问题。

此链接似乎也很有用, http://blog.scnetstudio.com/post/2011/01/08/How-to-Configure-Windows-Server-2008-R2-to-support-Web-Deploy-(for-Web-Matrix).aspx