MSDN says that WebConfigurationManager
is the preferred way to work with configuration files in web applications.
In web applications, configuration can be inherited from a web.config file in a parent virtual directory: WebConfigurationManager
will handle such inherited settings properly, which I believe isn't the case for ConfigurationManager
.
Of course, if your application does not inherit such settings (e.g. is always at the root of a web site), this is not relevant to you.