U have to use
System.Configuration
namespace for that u have to add reference
System.Configuration.dll
and replace the
string connStr = ConfigurationManager.ConnectionStrings["myCon"].ToString();
with
string connStr = ConfigurationManager.ConnectionStrings["myCon"].ConnectionString
and let me know if its helps or not