0
I would like to have 2 configuration files in my application c#. They would be web.config and web.debug.config.
The goal of this is that I can put some settings like database access and some appsettings according to the programmer who is programming.
That is, imagine that programmer A will connect in the database with user A and programmer B will connect in the database with user B.
Note that I am talking about connection to the database and not access permission due to x person logged into my system. It’s just so programmers don’t mess with the same database.
I tried using web.debug.config, but it only runs when I publish the application. Then this does not solve, because in production, will be only 1 connection user.
What I need is for every programmer to own their web.config.
An alternative is to put web.config as ignore in git so that everyone gets their local file. But, this is bad to manage due to other fields that need to be edited on the web.config.
In short: Is it possible to run web.debug.config when I do F5 (Debugging)? If that’s not possible, you have some other idea?
Thank you.
Cool this model. It wasn’t my initial idea, but it was nice to know that it is possible to separate part of the web.config file. Thank you for helping @Lucas Silva.
– Fabio Santos