Is my machine playing me today?
When I run the TestConnectionString() method of this object I get the error at the connection string setting.
public class CustomerDAL
{
string connectionString = ConfigurationManager.ConnectionStrings["myConnection"].Name;
public CustomerDAL()
{
}
public string TestConnection()
{
System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(connectionString);
conn.Open();
if (conn.State == System.Data.ConnectionState.Open)
{
return "Open";
}
else
{
return "Close";
}
}
}