I have a machine [A] running fresh installation of Win2008 R2 which holds a webapp on IIS. I try to use msdeploy
command line tool on machine [B] to publish a deployment package to this machine, but i keep on getting error regarding certificate.
I am using -allowuntrusted
, but it still keeps on giving the same error.
I've been trying different things (like changing msdeploy port on IIS, installing certificate on the other machine, reinstall iis roles, tons of other) for 2 days now with absolutely no luck.
This is what I run:
msdeploy.exe -verb:sync -source:package="Web.zip" -dest:auto,ComputerName="https://machineA:8173/msdeploy.axd?site=app.com",UserName="AdminUser",Password="SecurePassword",AuthType="Basic" -allowUntrusted
To make things more interesting, this is what I get when I run the same command on the IIS-containing machine (even after changing dest to sync):
Error: A '-dest' argument must be specified with the 'sync' verb.
Error count: 1.
Any ideas?
EDIT: I tried using the same settings (ip, package, authentication) in Visual Studio 2012 to create a publishing profile which deploys. After hitting "Verify connection", I got a popup asking if I want to accept this untrusted certificate. I clicked yes and went on to publish - that went through just fine.
Is there a way to get this behaviour with msdeploy command line? Using VS2012 is not an option for me, since publishing must be done automatically.
EDIT 2: The fun continues: it works on another Windows Server 2008 R2 target machine (not a clean install though). So, where's the magic checkbox? :)
So, I managed to figure out 2 solutions:
Get a valid certificate (we had one in company, so playing around with hosts on machine [B] to match IP with company's domain, helped).
Place "-allowUntrusted:true" BEFORE "-dest" instead of at the end. No clue why does it work on one but not another machine.
Hope this helps someone to save some time :)