2012-10-04 3 views
6

매개 변수 /p:DeployOnBuild=True이 전달되면 MSBuild에서 생성 된 ProjectName.deply.cmd를 실행하려고합니다. "ComputerName"인수 중 하나는 https://WebServer01:8172/MSDeploy.axd?SiteName=MySiteName으로 전달됩니다. 내 명령 줄 그것은 실행ProjectName.deploy.cmd에서 사이트 이름을 전달하는 방법

Error: Unrecognized argument 'MySiteName'. All arguments must begin with "-". 

실제 명령은 인수/M https://WebServer01:8172/MSDeploy.axd?Site=MySiteName는 두 개의 인수 따라서으로 분할하는 것을

"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 

공지 사항입니다 반환

ProjectName.deploy.cmd /Y /M:https://WebServer01:8172/MSDeploy.axd?Site=MySiteName 
         -AllowUntrusted /U:DeployUserName /P:Password /A:Basic 

computerName='https://WebServer01:8172/MSDeploy.axd?Site' 및 추가 인수 MySiteName을 생성합니다.

나는 Running a deployment package with quoted parameters fails in Visual Studio 2010 Service Pack 1을 거쳤으나 그 값은 ArgMsDeployAdditionalFlags이며 인수가 아닙니다. /M:ComputerName. 사이트 이름이 통과되지 않을 경우

, 나는 서버에 대한 관리자 권한을 가지고 있지만 표준 IIS 사용자 DeployUserName 사용하는 경우 내가
ProjectName.deploy.cmd /Y /M:https://WebServer01:8172/MSDeploy.axd 
         -AllowUntrusted /U:DeployUserName /P:Password /A:Basic 

는 서버 (401)를 반환 (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. 

권한은 해당 사용자를 사용하여 잘 작동 MSDeploy 프로파일 VS2012에서 게시로 괜찮습니다. 또한 msdeploy.exe 명령을 빌드 할 수 있으며 그 또한 잘 실행됩니다. 나는 ProjectName.deploy.cmdTeam Build의 일부로 생산 중이므로 TFS2010에서 사용해야합니다.

답변

7

인수를 인용 해 보셨습니까?

ProjectName.deploy.cmd /Y "/M:https://WebServer01:8172/MSDeploy.axd?Site=MySiteName" 
        -AllowUntrusted /U:DeployUserName /P:Password /A:Basic 
+0

질문에 오타가있었습니다. 나는 그것을 고쳤다. 이 문제는 논쟁 자체가 아닙니다. 이 방법은 명령 프롬프트에서 처리 한 다음 deploy.cmd 스크립트에서 정렬하여 msdeploy.exe로 전달합니다. –

+0

@amit_g - 업데이트 된 답변보기 –

+0

나는 이것들과 함께 다른 것을 시도해 보았을 것이라고 확신하지만 = 그 날에는 아무도 일하지 않았다. (오늘 나는 이것으로 시작했고 그것은 첫 번째 시도에서 시작되었다. 다른 보안 관련 문제는 거의 없었다. 그러나 그들은 똑바로되었다. 앞으로이 작업을 통해 배포 사용자에 대한 관리자 권한이 필요하지 않게되었습니다 (필자가 원했던 것입니다). 감사합니다. 리차드에게 도움을 요청합니다. –

관련 문제