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.
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;
I did not provision any certificate in server - Hence I gave Trust Server Certificate=True, so that self signed server certificate is not validated.
But the connection is not established with following error.
Database error: [DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.
Without the two attributes related to security, it works fine.
What do I need to change to get this to work?