WCF newbie - how to install and use a SSL certificate?

前端 未结 4 1785
说谎
说谎 2021-01-07 12:46

This should be a snap for anyone who\'s done it before...

I\'m trying to set up a self-hosted WCF service using NetTcpBinding. I got a trial SSL certificate from Th

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-07 13:26

    The problem is the issuer of your certificate is not trusted.

    WCF will try to verify the chain of certificates. One solution is to make sure the certificate used to issue the one you have is stored in the trusted issuers store of the server.

    You could also add a custom certificate policy to bypass validation on your development env (as explained here)

    You could also put your certificate in the 'Trusted People' stored and set the certificateValidationMode to ChainOrPeerTrust. This will try to validate the complete chain unless you put the certificate into the 'Trusted People' store. This would allow you to leave the configuration and code untouched for the deployment to production env. You will simply put your certificate in the 'Trusted People' store in your development env.

提交回复
热议问题