I have written a simple wpf application for binding data in datagrid. It throws error while running at following line.
string ConString = System.Configuration.ConfigurationManager
.ConnectionStrings["ConString"].ToString();
Exception shows: Exception has been thrown by the target of an invocation."
InnerException:{"Object reference not set to an instance of an object."}
Probably System.Configuration.ConfigurationManager.ConnectionStrings[“ConString”] is NULL or
System.Configuration.ConfigurationManager.ConnectionStrings is NULL.