I'm looking for the most secure and most convenient method to store some critical parameters into a configuration file of my ASP.NET web site (code in C# with Visual Studio 2012, and published with IIS, but I don't know this really matters), such as connection strings, and other parameters.
From what I found, I have the following options :
- The web.config. That way, only my website will access the settings.
Problem : when I publish the changes of my site from Visual Studio, the parameters may be overwritten (or is there a way not to overwrite them during the publication ?)
- The machine.config => The publication won't overwrite the existing parameters.
Problem : All websites on the machine will have access to the configuration file (and this may be a security issue)
- SQL Server : easy to maintain
Problem : needs a Connection String to access the database. Where should I store the Connection String ?
Registry : Average maintainability. Impossible to define specific users rights for each category or web site.
A simple INI file. Very easy to maintain. But is that secure enough ?
Thanks in advance for your answers.