我用C#.NET开发了一个Windows服务,并从我的Windows服务调用了一个Java Web服务 . Web服务受证书保护,因此我的客户已向我提供了证书 . 我已使用MMC.EXE将证书安装到Root,Personal和Trusted People部分,但在尝试与其API通信时出现以下错误 .

无法与权限'pmtest.xxxxxx.ua:9192' Build SSL / TLS安全通道的信任关系 . 内部异常:根据验证过程,远程证书无效 .

这是我在其Web服务中调用该方法的代码 .

try
   {
      System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
     resp = (EBMType)wsClient.InvokeMember(this.remoteMethodName, BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public, null, this.privatMoney, new object[] { this.requestObject }); //Here I'm getting error
    }
  catch (System.Reflection.TargetInvocationException e)
    {
              System.ServiceModel.FaultException<FaultType> ex = (System.ServiceModel.FaultException<FaultType>)e.InnerException;
                    throw new ApplicationException(string.Format("PrivatMoney error occurred. Message: {0}, Code: {1}", ex.Detail.FaultNotification.FaultMessage.Text, ex.Detail.FaultNotification.FaultMessage.Code));
     }

我可以知道在这种情况下该怎么做,因为我在这个领域很新 . 提前致谢 .