I have an asp.net web application that is using a MembershipProvider and RolesProvider that I wrote to use our eDirectory ldap servers.
Here are my providers now:
<membership defaultProvider="EDirectoryMembershipProvider">
<providers>
<clear/>
<add name="EDirectoryMembershipProvider" type="EDirectoryMembershipProvider"
PrimaryLdapServer="1.2.3.4"
SecondaryLdapServer="5.6.7.8"
LdapPort="1234"
CertPath="d:\mycert.crt" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="EDirectoryRoleProvider" cacheRolesInCookie="true" cookieRequireSSL="true">
<providers>
<clear/>
<add name="EDirectoryRoleProvider" type="EDirectoryRoleProvider"
PrimaryLdapServer="1.2.3.4"
SecondaryLdapServer="5.6.7.8"
LdapPort="1234"
CertPath="d:\mycert.crt" />
</providers>
</roleManager>
These two providers are configured in web.config and the settings for both are the same. Is there a way to store the settings in another section (preferably appsettings) and reference that section for the providers' configuration?