App.config code as follows
Code
In Appconfig code as followsCode
Code
Code
Code
Code
Code
Code
Code
Code
Code
Code
Program.cs page code as followsCode
string connectionString = ConfigurationManager.ConnectionStrings["OneTransportConnectionString"].ConnectionString;Code
SqlConnection sqlConnection = new SqlConnection(connectionString);Code
SqlCommand cmd = new SqlCommand();Code
SqlDataReader reader;Code
cmd.CommandText = "Select * from Customers";Code
cmd.CommandType = CommandType.Text;Code
cmd.Connection = sqlConnection;Code
sqlConnection.Open();Code
reader = cmd.ExecuteReader();Code
Console.WriteLine("test");Code
sqlConnection.Close();Configuration system failed to initialize
The above error code in below line as follows
string connectionString = ConfigurationManager.ConnectionStrings["OneTransportConnectionString"].ConnectionString;
Code
please help me what is the mistake in my above codeCode
Code

Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 24, 2016, 12:09 AM EDT
ketan borsdiyaRank #2,258 · 624 reputationPosted Aug 24, 2016, 12:23 AM EDT