0

I'm trying to deploy a website to an IIS6 box using msdeploy.exe. I can publish similar websites to the same server using Visual Studio 2010, so I know that the MS Deployment Agent Service is running and configured correctly. But when I try to run a command, like say:

msdeploy -verb:sync -source:contentPath=C:\source\ -dest:iisApp="beta",wmsvc=beta.alanta.com,username=Administrator,password=xxx

Then I get this error message:

Error: Could not complete the request to remote agent URL 'https://beta.alanta.com:8172/msdeploy.axd?Site=beta'. Error: Unable to connect to the remote server Error: No connection could be made because the target machine actively refused it 74.208.74.114:8172 Error count: 1.

OK, that makes sense: this is an IIS6 machine, and it takes a different URL syntax. But if I try the syntax that's recommended here, like so:

msdeploy -verb:sync -source:contentPath=C:\source\ -dest:iisapp="beta",wmsvc=http://beta.alanta.com/MsDeployAgentService,username=Administrator,password=xxxx

Then I get this error message:

Error: Could not complete the request to remote agent URL 'https://http//beta.alanta.com/MsDeployAgentService:8172/msdeploy.axd?Site=beta'. Error: The remote name could not be resolved: 'http' Error count: 1.

In other words, the msdeploy command wants to insist on throwing an SSL prefix in front of any URL that I put in there - but SSL isn't configured on this box. I've been googling for the last two hours, and can't figure out the right syntax. Any suggestions?

Community
  • 1
  • 1
Ken Smith
  • 20,305
  • 15
  • 100
  • 147

1 Answers1

1

I had the same problem using msbuild command found on this blog: http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity_24.html.

Finally, I found that changing the Publish Method to MsDepSVC solve this issue and worked properly.

here are my msbuild properties: /P:Configuration=%env.Configuration%
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:MsDeployServiceUrl=https://%env.TargetServer%/MSDeployAgentService /P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=MsDepSVC
/P:CreatePackageOnPublish=True
/P:UserName=anAdminDeployBot /P:Password=aGre4tP4ssw0r6

Simon
  • 146
  • 3
  • To elaborate: the reason you have to use MsDepSvc (Web Deploy Agent Service) rather than WMSvc (Web Management Service) in this case is that WMSvc is an IIS component that only exists on IIS7 and up. Additionally, though WMSvc can be installed on client SKUs Vista+, it is only functional for Web Deploy publishing on server SKUs. – krolson Sep 20 '12 at 22:23