MSDeploy to IIS6 via wmsvc

给你一囗甜甜゛ 提交于 2020-01-17 04:38:29

问题


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?


回答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



来源:https://stackoverflow.com/questions/6523746/msdeploy-to-iis6-via-wmsvc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!