Using keys in same web.config
<p>My application accesses an active directory for login and querying information about users and I'd like to keep all of my active directory connection information in one place.</p>

<p>I'd like to be able to access AD connection information from web.config.  I'd assume the correct way to do that would be through appSettings</p>

<pre><code>&lt;appSettings&gt;
  &lt;add key="LDAPPassword" value="LDAPPassword"/&gt;
  &lt;add key="LDAPPath" value="LDAP://ConnectionString"/&gt;
  &lt;add key="LDAPUser" value="LDAPUser"/&gt;
&lt;/appSettings&gt;
</code></pre>

<p>How would I go about using these keys further down in the web.config file in order to configure the MembershipProvider?</p>

<pre><code>&lt;membership defaultProvider="ADMembershipProvider"&gt;
  &lt;providers&gt;
    &lt;clear /&gt;
    &lt;add name="ADMembershipProvider"
         type="System.Web.Security.ActiveDirectoryMembershipProvider, BlahBlahBlah"
         connectionStringName=LDAPPath
         connectionUsername=LDAPUser
         connectionPassword=LDAPPassword
    /&gt;
  &lt;/providers&gt;
&lt;/membership&gt;
</code></pre>

<p>If it is not possible to simple use those added keys is there some sort of support for declaring variables elsewhere that will let me keep from repeating this environment specific information?  Or is it possible to query the ADMembershipProvider for it's connectionString, connectionUsername and connectionPassword?</p>
