December 2006 Entries
Recently I got a chance to play around with the Data Protection Application Programming Interface (DPAPI). With .NET 2.0 installed, you can encrypt your Web.config just by using aspnet_regiis.exe on the command line. aspnet_regiis.exe -pe "connectionStrings" -app “/YourWebSite” –prov "DataProtectionConfiguratio... You can read the ConnectionStrings section back using ConfigurationManager as if the file is not encrypted. That is all you have to do, the encryption is transparent...