usa la classe SqlConnectionStringBuilder
SqlConnectionStringBuilder conn = new SqlConnectionStringBuilder(ConnectionStringFromConfig)
{ InitialCatalog = "your CatalogName" }; // you can add other parameters.
quindi usa questa connectionstring dove richiesto
conn.ConnectionString;