How to set up a connection string so communication with the SQL server is encrypted

The connection string below is an example that specifies the use of encryption.

Essentially you are using the connection string from the SQL section of your control panel and adding encrypt=true to the end. Setting the encrypt property to true will cause the transmission of data to and from the SQL server to be encrypted.


        <add name="MyConn" connectionString="Data Source=[SQL Server Name];Initial Catalog=[DB Name];User ID=[DB Username];Password=[DB password]; encrypt=true" providerName="System.Data.SqlClient"/>

If you run into problems when using this code, please post in the DiscountASP.NET or Everleap community forum. Technical support is unable to assist with specific coding issues.