My company has an application which stores one value programatically in web.config file. The web.config file is updated about once every five minutes.
James Curran posts that it is a bad idea to modify web.config programatically in this answer Dynamically change connectionString in web.config but he does not explain why it is a bad idea.
I'm looking for reasons to convince my boss to not store any dynamic data in the web.config file. Links to good articles would be especially appreciated.
The application restarts every time you modify web.config, for starters.
It is bad idea because every time you modify config file the web application will restart. Also, if you are using "web site" project it will also be compiled every time you modify config. So you will have performance and responsicness issues. You boss probably don't want that:)
In addition to the application restarting, you have several security related values stored in your Web.config file. Your application shouldn't even have write permissions to that file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With