If you are using the ADO.NET SQL Server managed data provider and a SqlConnection object to connect to SQL Server, then you can enable encryption by adding the encrypt=true parameter to the connection string as shown here.
<configuration>
<connectionStrings>
<add name="MyDbConn"
connectionString="Server=MyServer;Database=pubs;User Id=sa; password=database;
encrypt=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
Encryption is off by default.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5