Author: mkamoski | Posted on: 3/30/2009 10:57:47 AM | Views : 800

All --

Please help.

How can one dynamically set the membership provider connectionStringName at run-time?

For example, I have something the following... 

 <connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=111.111.111.111;Network Library=DBMSSOCN;Initial Catalog=MyDatabase04;User ID=MyDatabase04User;Password=MyFunnyPassword;" providerName="System.Data.OleDb" />
</connectionStrings>

<membership>
<providers>
<remove name="AspNetSqlMembershipProvider" />
<add connectionStringName="LocalSqlServer" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Encrypted&quo ...

Go to the complete details ...