I am creating a microsoft WPF project and ran into the following hindrance:
Null reference was unhandled Object reference not set to an instance of an object
My VS 2010 points to the following line of code:
string connectionString = ConfigurationManager.ConnectionStrings["Lab06Wpf.Properties.Settings.AppConnectionString"].ConnectionString;
Not sure why this is happening, I have a similar project where I have a similar connection string and it runs itself just fine.
The ConnectionStrings argument
Lab06Wpf.Properties.Settings.AppConnectionString is valid and the connection has been tested.
Any leads anyone?
That is returning null and your are calling
ConnectionString on it. You need to find out why it is returning null. Use your debugger to see what
ConnectionStrings contains and why your call is failing.