title: encrypt SQL connectionstring c#
body: <p>I created an c# application (not asp webpage) which connects to a sql 2005 server. In my sourcecode the password and userid for this sql-server is coded plain text in ConnectionString.</p>
  
  <pre><code>SqlConnection con = new SqlConnection();
  con.ConnectionString = 
           "Data Source=server1;"+
           "Initial Catalog=mydatabase;"+
           "Integrated Security=no;"+
           "User ID=admin;Password=mypassword;";
  con.Open();
  </code></pre>
  
  <p>Is there a easy way to encrypt password or whole connectionstring, that other peoples who disassemble my tool are not able to see the password?</p>
  
  <p>thanks</p>