1
votes

I'm trying to publish ASP.NET web api project using web deploy and the following error occurs.

Web deployment task failed. (Connected to the remote computer ("xxxxx") 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.)

  1. Imported the certificate from MSDeployServiceURL to Trusted Root Certification Authorities folder.
  2. I also tried to deploy from remote machine (xxxxx) for it's IIS instance and apparently it's not trusting it's own certificate either.
  3. <AllowUntrustedCertificate>true</AllowUntrustedCertificate> to the pubxml file.

Any suggestions to fix this?

1
Looks like this issue should be resolved in the next VS 2017 update -> developercommunity.visualstudio.com/content/problem/33263/…Levi Fuller

1 Answers

2
votes

I experienced the same issue. It seems to be intermittent and with no clear cause.

The only solution I've found is to re-import the pubxml file which was created by IIS for web deploy.

Its not really a fix as it keeps re-occurring however the work around may help if you're struggling to redeploy quickly.