Encrypt / Decrypt Sections of App.Config file in Windows Application
- by bullpit
This is just a note to myself on how to Encrypt and Decrypt App.Config (or Web.Config if ASP.NET) in a Windows Application.
Encryption:
1. Rename App.Config to Web.Config
2. %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -pef "connectionStrings" <Full Path to Web.Config>
3. Succeeded! implies Encryption was successful
4. Rename Web.Config to App.Config
Descryption:
1. Rename App.Config to Web.Config
2. %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -pdf "connectionStrings" <Full Path to Web.Config>
3. Succeeded! implies Decryption was successful
4. Rename Web.Config to App.Config (if needed)