0

我正在尝试使用 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.

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

4

1 回答 1

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 -矩阵).aspx

于 2012-06-25T22:56:14.180 回答