Enable SQL encryption in ASP.NET

January 21, 2010 by: Sanket

Database Encryption is ASP.NET

 

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.

Leave a Reply

*