App.config code as follows
In Appconfig code as follows
Program.cs page code as followsstring connectionString = ConfigurationManager.ConnectionStrings["OneTransportConnectionString"].ConnectionString;SqlConnection sqlConnection = new SqlConnection(connectionString);SqlCommand cmd = new SqlCommand();SqlDataReader reader;cmd.CommandText = "Select * from Customers";cmd.CommandType = CommandType.Text;cmd.Connection = sqlConnection;sqlConnection.Open();reader = cmd.ExecuteReader();Console.WriteLine("test");sqlConnection.Close();When i run the above code shows error as follows
Configuration system failed to initialize
The above error code in below line as follows
string connectionString = ConfigurationManager.ConnectionStrings["OneTransportConnectionString"].ConnectionString;
please help me what is the mistake in my above code
ketan borsdiyaPosted Aug 24, 2016, 4:23 AM
Rajeesh MenothPosted Aug 24, 2016, 4:09 AM