We've two features both are designed to update (and modify) the web.config. One feature doesn't have any interface it is a SPJob which run on feature activation and copy user controls into web application virtual directory and update web.config. The second feature has a interface which is designed to configure database (or connect with) for user controls.
For deployment, there is a single batch file which do the complete web application installation like create a site, install all third-party components etc etc. And those two features activation command is also included.
The problem we are having is when we confirm the first feature changes in the web.config which it does silently we can see there. Now, we go and configure our database for custom controls. This second feature add up an Application Page where we provide all required credential. We also confirm the database creation from SQL Server Management Studio. Now, we open the web.config again and looking for the changes which we expect - a connection string it is there but the changes which was made by our first feature is gone!
The command we called to commit the web.config changes in both features is:
Could you help what we are doing wrong here and what should we do to the features so they avoid overwrite each other changes?