Link to home
Start Free TrialLog in
Avatar of Hojoformo
Hojoformo

asked on

Best Practise for Storing SQL Connection Strings in C# WIndow Form Applications

What is the best practise for storing and securing SQL Server connection strings in window desktop applications?  Is it better to store in the app.config or maybe a separate class.  Also, is there any way to encrypt or secure the connection string?  
Avatar of Alfred A.
Alfred A.
Flag of Australia image

In my opinion, app.config is the place to put your connection strings.  The purpose of the app.config is for configuration settings, so it is appropriate to use app.config than putting it in a class.

For encrypting app.config, check the links below:

http://www.codeproject.com/KB/cs/Configuration_File.aspx

http://datacogs.com/datablogs/archive/2006/08/23/393.aspx

Avatar of Kalpesh Chhatrala
Check below link for Securing Data Layer in C# Application.

http://stackoverflow.com/questions/1214621/securing-your-data-layer-in-a-c-application
ASKER CERTIFIED SOLUTION
Avatar of Kalpesh Chhatrala
Kalpesh Chhatrala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial