Mohammad Nadeem
Mohammad Nadeem

Reputation: 9392

why WebConfigurationManager is supposed to be a preferred way to work with configuration files related to Web applications

I tried updating a web.config file at run time treating it as an XML file. However the same can be achieved using WebConfigurationManager class. And in fact it is said that using WebConfigurationManager is the preferred way. My question is what's the difference?

Upvotes: 0

Views: 85

Answers (1)

Henk Holterman
Henk Holterman

Reputation: 273274

When you use the WebConfigurationManager API you can be sure you use it correctly and efficiently.

What would be the benefit of using an XML API? You would have to be careful to respect the schema, and work out how the refresh/reload works.

Upvotes: 1

Related Questions