Tell me more ×  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.Sett
ings.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?
share|improve this question you should test everything against
null maybe? –  SinistraD Jun 17 '11 at 22:39 Use the debugger,
break on the exception, and inspect the assumption at the
current point in code. Something is null. Playing guessing games
on SO is only so much fun. –  user166390 Jun 17 '11 at 22:40 add
comment  1 Answer   That is returning null and your are calling
Connection