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?  
C#

Avatar of undefined
Last Comment
Éric Moreau
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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
C#
C#

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).

98K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo