If you've come across this error when starting up an application, be sure to check the format of your app.config file. It turns out that this exception is of the type
System.Configuration.ConfigurationErrorsException.
The real problem was that I had ended up generating a malformed config file (see the schema in c:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\DotNetConfig.xsd) by putting configSections after appSettings. Once I put the configSections element back to the top of the config file, everything was fine again.