title: SSL Connection to database
body: <p>My application need to establish secure connection with SQL Server 2008. Having enabled 'Force Encryption' in server side, following is my connection string from my C# application.</p>
  
  <pre><code>Initial Catalog=emp_test;Persist Security Info=True;User ID=sa;Password=***;Data Source=172.21.70.94;Provider=SQLOLEDB;Use Encryption for Data=True;Trust Server Certificate=True;
  </code></pre>
  
  <p>I did not provision any certificate in server - Hence I gave Trust Server Certificate=True, so that self signed server certificate is not validated.</p>
  
  <p>But the connection is not established with following error. </p>
  
  <blockquote>
    <p><em>Database error: [DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.</em></p>
  </blockquote>
  
  <p>Without the two attributes related to security, it works fine.</p>
  
  <p>What do I need to change to get this to work?</p>