This is my app.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="radicalGuard" value="Data Source = MICHAEL-PC\SQLEXPRESS; Initial Catalog = radicalGuardDB; Integrated Security = True" /> </appSettings> </configuration>
And this is my connection string
SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["radicalGuard"].ToString());
Whenever I try to debug, it says "object reference not set to an instance of an object", and if I try to run without debugging it will say "application has stopped working"..