IIS MSDeploy Using Self Signed Certificate

Laura Bailey 1 Reputation point
2021-02-25T02:12:45.47+00:00

I'm getting this error when I try to deploy to my IIS server from my development machine.

https://learn.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/web-deploy-error-codes#error_certificate_validation_failed

One of the suggestions is to install a trusted certificate at the endpoint. There is a self-signed certificate at the endpoint being used as the certificate for the WMSvc. I have installed this certificate on my development machine in my Trusted Root Certification Authorities certificate store but MSDeploy still returns the same error.

What are the steps to install a self-signed certificate on a machine so that MSDeploy will trust the server it deploys to? I do not want to bypass certificate validation.

Developer technologies | ASP.NET | ASP.NET Core
Windows for business | Windows Server | Devices and deployment | Configure application groups
Community Center | Not monitored
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Laura Bailey 1 Reputation point
    2021-02-25T02:15:30.85+00:00

    I can't stress enough that I DO NOT WANT TO BYPASS CERTIFICATE VALIDATION.

    0 comments No comments

  2. Bruce Zhang-MSFT 3,771 Reputation points
    2021-02-25T06:49:10.633+00:00

    Hi @Laura Bailey ,

    The reason for this problem is that the certificate is not trusted or the certificate is wrong, so there are two things you need to check.

    1. Make sure that the certificate password you are using is correct.
    2. Is the root certificate of the self-signed certificate also on the development machine? If the root certificate is not in the Trusted Root Certification Authorities certificate store, even if the self-signed certificate exists, it will still not pass the verification and it is still an untrusted certificate.

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.