Here\'s a standard scenario:
if(string.IsNullOrEmpty(Configuration.AppSettings[\"foobar\"]))
throw new SomeStandardException(\"Application not configured
ConfigurationErrorsException is the correct exception to throw in the situation you describe. An earlier version of the MSDN documentation for ConfigurationErrorsException makes more sense.
http://msdn.microsoft.com/en-us/library/system.configuration.configurationerrorsexception(VS.80).aspx
The earlier MSDN summary and remarks are:
ConfigurationErrorsException
exception is thrown when any error
occurs while configuration
information is being read or
written.