ami*_*t_g 6 deployment msbuild msdeploy tfs2010
我正在尝试运行由参数/p:DeployOnBuild=True传递时由MSBuild生成的ProjectName.deply.cmd .其中一个参数"ComputerName"将被传递为https://WebServer01:8172/MSDeploy.axd?SiteName=MySiteName.我的命令行是
ProjectName.deploy.cmd /Y /M:https://WebServer01:8172/MSDeploy.axd?Site=MySiteName
-AllowUntrusted /U:DeployUserName /P:Password /A:Basic
Run Code Online (Sandbox Code Playgroud)
它回来了
Error: Unrecognized argument 'MySiteName'. All arguments must begin with "-".
Run Code Online (Sandbox Code Playgroud)
执行的实际命令是
"C:\Program Files\IIS\Microsoft Web Deploy V3\\msdeploy.exe"
-source:package='Y:\ProjectName.zip'
-dest:auto,computerName='https://WebServer01:8172/MSDeploy.axd?Site',userName='DeployUserName',password='Password',authtype='Basic',includeAcls='False'
-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension
-disableLink:CertificateExtension
-setParamFile:"Y:\ProjectName.SetParameters.xml"
MySiteName
-AllowUntrusted
Run Code Online (Sandbox Code Playgroud)
请注意,/ M的参数https://WebServer01:8172/MSDeploy.axd?Site=MySiteName被拆分为两个参数,从而创建computerName='https://WebServer01:8172/MSDeploy.axd?Site'和附加参数MySiteName.
我已经完成运行带有引用参数的部署包在Visual Studio 2010 Service Pack 1中失败,但是只处理ArgMsDeployAdditionalFlags而不是参数,例如/M:ComputerName.
如果没有传递SiteName,我可以使用在服务器上具有管理员权限的用户进行部署,但是当使用标准IIS用户DeployUserName时,我得到401
ProjectName.deploy.cmd /Y /M:https://WebServer01:8172/MSDeploy.axd
-AllowUntrusted /U:DeployUserName /P:Password /A:Basic
Run Code Online (Sandbox Code Playgroud)
服务器返回401
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("WebServer01") 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.
Run Code Online (Sandbox Code Playgroud)
该用户的权限是精细,因为从发布VS2012与MSDeploy个人资料中使用该用户工作得很好.我也可以建立msdeploy.exe命令,也运行良好.我不得不使用ProjectName.deploy.cmd,因为它正在产生的作为其一部分Team Build从TFS2010.
你试过引用这个论点吗?
ProjectName.deploy.cmd /Y "/M:https://WebServer01:8172/MSDeploy.axd?Site=MySiteName"
-AllowUntrusted /U:DeployUserName /P:Password /A:Basic
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2564 次 |
| 最近记录: |