msdeploy getting ERROR_CERTIFICATE_VALIDATION_FAILED, allowUntrusted being ignored

Adding <AllowUntrustedCertificate>True</AllowUntrustedCertificate> to my pubxml file seemed to fix the problem initially.

Upon re-publishing days later though, I got the same error. I went into the Publish Settings, re-entered my password and the publish succeeded.

I'm now thinking my initial problem was solved by re-entering my password, not by adding <AllowUntrustedCertificate>True</AllowUntrustedCertificate>.

Publish Screen


-allowUntrusted did not worked for me.

I used this:

/p:AllowUntrustedCertificate=True

I fixed this by going into the publish settings, then clicking "Validate Connection" at the bottom. Then this error goes away.

Tags:

Msdeploy