Questions That Should Be Asked More Frequently
Where should I store my connection strings?
That’s a bit of a loaded question. Some developers want to separate the connection string from the rest of the application in case they want to reconfigure the connection string without having to change the code in the application. Other developers’ primary goal is to keep the connection information a secret. To see how to accomplish either goal, read the next two Q&As.
How should I store my connection strings to isolate them from the rest of the code in my application?
Configuration files are a great way to isolate this information from the rest of your application. They’re easy to create and modify using simple tools. The .NET Framework offers configuration ...