Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Enables adding a ConnectionString at runtime
// Enables adding a ConnectionString at runtime
typeof ( ConfigurationElementCollection )
.GetField( "bReadOnly", BindingFlags.Instance | BindingFlags.NonPublic )
.SetValue( ConfigurationManager.ConnectionStrings, false );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment