title: X.509 Chain Building Failed when connecting to the AppFabric
body: <p>Writing a test application for my AppFabric-based library, I started getting a strange exception.</p>
  
  <p><code>The X.509 certificate CN=servicebus.appfabriclabs.com chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. The revocation function was unable to check revocation because the revocation server was offline.</code></p>
  
  <p>I've tried with next configuration with no success</p>
  
  <pre><code>&lt;behaviors&gt;
   &lt;endpointBehaviors&gt;
    &lt;behavior name="SecureMessageUserName"&gt;
     &lt;clientCredentials&gt;
       &lt;serviceCertificate&gt;
          &lt;authentication revocationMode="NoCheck"/&gt;
       &lt;/serviceCertificate&gt;
     &lt;/clientCredentials&gt;
    &lt;/behavior&gt;
   &lt;/endpointBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p>and also with <a href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.checkcertificaterevocationlist" rel="nofollow"><code>ServicePointManager.CheckCertificateRevocationList</code></a> set to <code>false</code> with no success.</p>