Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

msdeploy getting ERROR_CERTIFICATE_VALIDATION_FAILED, allowUntrusted being ignored

Tags:

msdeploy

I am using msdeploy to push out website code to 4 different servers (test and production servers). Works fine on the first 3, but the 4th is giving me an ERROR_CERTIFICATE_VALIDATION_FAILED error. I am using the -allowUntrusted option.

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:iisApp="E:\workspace\testDeploy\outproject\_PublishedWebsites\<webfolder>" -dest:iisApp="mycompany.com",ComputerName="https://<hostip>:8172/MsDeploy.axd",UserName="<userid>",Password="****",AuthType="Basic" -allowUntrusted -enableRule:AppOffline -skip:objectName=filePath,absolutePath="^.*<webfolder>\\web.*\.config$|^.*mycompany\.com\\web.*\.config"

Error Code: ERROR_CERTIFICATE_VALIDATION_FAILED
More Infenter code hereormation: Connected to the remote computer ("<hostip>") using the specified process ("Web Management Service"), but could not verify the server's certificate. If you trust the server, connect again and allow untrusted certificates.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED.
Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Error: The remote certificate is invalid according to the validation procedure.

Any idea what I am missing?

like image 939
VingInMedina Avatar asked Oct 12 '15 19:10

VingInMedina


2 Answers

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

like image 136
spottedmahn Avatar answered Oct 15 '22 03:10

spottedmahn


-allowUntrusted did not worked for me.

I used this:

/p:AllowUntrustedCertificate=True
like image 13
Christian Rios Avatar answered Oct 15 '22 03:10

Christian Rios