/p:DeployOnBuild=True
パラメータが渡されたときに MSBuild によって生成される ProjectName.deply.cmd を実行しようとしています。引数「ComputerName」の 1 つが として渡され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
戻る
Error: Unrecognized argument 'MySiteName'. All arguments must begin with "-".
実際に実行されるコマンドは
"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
/M への引数https://WebServer01:8172/MSDeploy.axd?Site=MySiteName
が 2 つの引数に分割されていることに注意してください。したがって、computerName='https://WebServer01:8172/MSDeploy.axd?Site'
and および 追加の引数が作成されます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
サーバーは 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.
そのユーザーの権限は、そのユーザーを使用VS2012
したMSDeploy
プロファイルからの発行が正常に機能するため、問題ありません。msdeploy.exe
コマンドをビルドすることもでき、それも正常に動作します。fromProjectName.deploy.cmd
の一部として生成されているため、 を使用する必要があります。Team Build
TFS2010