Author: M1iS | Posted on: 2/12/2011 2:14:38 PM | Views : 533

I have a situation where I need to use the SqlMembershipProvider and SqlRoleProvider programmatically in a WPF application.  I first tried to put the system.web section in my app.config file which works fine, but I need to programmatically change the connection string and am unable due to the following exception.
ConfigurationErrorsException: The configuration is read only.
So I'm thinking there must be a way to just do all the configuration programmatically?  In the SqlMembershipProvider SqlRoleProvider I can see a way to set the application name but no way to set the connection string.  What would be the best way to approach this?


Scott

...

Go to the complete details ...