可能出现的问题
Could not establish trust relationship for the SSL/TLS secure channel with authority.
在client连接wcf创建通道的代码前增加如下代码即可:
ServicePointManager.ServerCertificateValidationCallback += (s, cert, chain, sslPolicyErrors) => true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
IClientChannel channel = GetChannelFactory(endPoint).CreateChannel() as IClientChannel;