title: ActiveDirectoryMembershipProvider - "Unable to establish secure connection"
body: <p>I am trying to configure an ActiveDirectoryMembershipProvider but I keep getting the message "Unable to establish secure connection with the server". </p>
  
  <p>I have seen online at the MSDN website that I should configure the trust level to unrestricted on my site and I still get that.</p>
  
  <p>Here is my example:</p>
  
  <pre><code>&lt;connectionStrings&gt;
  
       &lt;add name="LocalAD" connectionString="LDAP://example.com/dc=example,dc=com" /&gt;
  
  &lt;/connectionStrings&gt;
  
  
  &lt;membership defaultProvider="AspNetActiveDirectoryMembershipProvider"&gt;
  
      &lt;providers&gt;
  
          &lt;add name="AspNetActiveDirectoryMembershipProvider"
               type="System.Web.Security.ActiveDirectoryMembershipProvider" 
               applicationName="adtest"
               connectionUsername="cn=Users"
               connectionPassword="password"
               connectionStringName="LocalAD" &gt;
  
         &lt;/add&gt;
      &lt;/providers&gt;
  &lt;/membership&gt;
  
  &lt;trust level="Full" /&gt;
  
  &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="login.aspx"
               protection="All"
               timeout="30"
               name="miBenefitsAdminToolCookie"
               path="/"
               requireSSL="false"
               slidingExpiration="true"
               defaultUrl="Default.aspx"
               cookieless="UseCookies"
               enableCrossAppRedirects="false" /&gt;
  
   &lt;/authentication&gt;
  
   &lt;authorization&gt;
        &lt;deny users="?" /&gt;
        &lt;allow users="*" /&gt;
   &lt;/authorization&gt;
  </code></pre>