Encrypted application configuration file - ASP.NET Security
Q. If you must use a user name and password to connect to a database, where should you store the sensitive information?- Published on 31 Aug 15a. Compiled in the application
b. In an encrypted application configuration file
c. In a resource file deployed with the application
d. In the registry
ANSWER: In an encrypted application configuration file
If your connection string contains sensitive information then encrypted application configuration file by using RsaProtectedConfigurationProvider: