0

How to manage connectionstring in c# application.Is it a good practise to encrypt the string within the database connection class in the project ?

sqlcon = new SqlConnection(@"Data Source=" + strServer + ";AttachDbFilename=" + path + ";Integrated Security=True;Connect Timeout=120;User Instance=True");
Tharif
  • 13,794
  • 9
  • 55
  • 77
  • 1
    There are couple existing questions on storing secrets in .Net applications (or applications in general). I'd recommend searching and possibly finding solution that way.... – Alexei Levenkov May 29 '15 at 05:24
  • constr should be inside app settings or web.config file – user786 May 29 '15 at 05:25

0 Answers0