title: WCF : Could not establish trust relationship for the SSL/TLS secure channel for localhost
body: <p>The setup is that I'm hosting 2 similar WCF app on the same HTTPS website using the same application pool and certificate.</p>
  
  <p>Now the first WCF app calls the second WCF on a certain function. After calling the second WCF on the first, exception gets thrown </p>
  
  <pre><code>"Could not establish trust relationship for the SSL/TLS secure channel..."
  </code></pre>
  
  <p>I've seen similar questions but the difference is that mine should work since it's using the same certificate. What might be going on?</p>
  
  <p>EDIT: </p>
  
  <p>basically here's how the second WCF is called inside a method in the first WCF,</p>
  
  <pre><code>public void SomeMethod(string parameter)
  {
     SecondServiceClient svc2 = new SecondServiceClient ("BasicHttpBinding_IService2");
     svc2.DoWork(parameter);
  }
  </code></pre>
  
  <p>first WCF's web.config endpoint for the second WCF has something like this:</p>
  
  <pre><code>...
  &lt;client&gt;
    &lt;endpoint address="https://192.168.1.100/MyService2/Service2.svc"
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService2"
      contract="SecondService.IService" name="BasicHttpBinding_IService" /&gt;
  &lt;/client&gt;
  ...
  </code></pre>
  
  <p>HTTPS is hard to play with, I say.</p>