ConfigurationManager is not working! RRS feed

  • Question

  • User1820827484 posted

    Hi Community, 

    I am trying to accss ConfigurationManager , but its not working. It is console application Following is code:

    using System; 
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Data;
    using System.Data.SqlClient;
    using System.Configuration; // Namespace to access Configuration Manager
    namespace FileReader
        public class Connection
            // get database connection access
            public static SqlConnection GetDatabaseConnection(){
                string connectionString = "Want to use ConfigurationManager here.but it is not accessing...";
                SqlConnection connection = new SqlConnection(connectionString);
                return connection;

    Please let me know, where is problem ? 

    Friday, May 24, 2013 6:31 AM


All replies