I have a username and password key within my web.config file. I need to access those keys within the web.config in a provider. Is this possible if so what is the best way to accomplish this?
This is an example of how I want it to work:
<add key="ActiveDirectoryUser" value="user"/>
<add key="ActiveDirectoryPass" value="pass"/>
<membership defaultProvider="ADMembershipProvider">
<providers>
<clear />
<add name="ADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="ADConnectionString"
connectionUsername="userfromabove"
connectionPassword="passfromabove"
attributeMapUsername="sAMAccountName" />
</providers>
</membership>
Access from within the web.config not in code.