Blog Stats
  • Posts - 21
  • Articles - 0
  • Comments - 25
  • Trackbacks - 17

 

December 2006 Entries

Encrypting Web.config and App.config

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...

 

 

Copyright © Aaron Feng