Skip to content

Instantly share code, notes, and snippets.

@randyburden
Created March 23, 2015 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save randyburden/039b9f82a05ce8f8fa48 to your computer and use it in GitHub Desktop.
Save randyburden/039b9f82a05ce8f8fa48 to your computer and use it in GitHub Desktop.
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