(Asked by @tomhollander on Twitter) What’s the most appropriate exception to throw if a required app/web.config configuration setting is not present?
(Asked by @tomhollander on Twitter) What’s the most appropriate exception to throw if a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ConfigurationException is obsolete. The docs say it’s been replaced by ConfigurationErrorsException, but this is designed to convey failures in the configuration system – I don’t believe it’s intended to show problems such as missing or malformed configuration values.