posts - 31, comments - 88, trackbacks - 0

My Links

News

Archives

Post Categories

Monday, January 17, 2011

Encrypt / Decrypt Sections of App.Config file in Windows Application

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)

Posted On Monday, January 17, 2011 10:44 AM | Feedback (1) | Filed Under [ Tips n Tricks ]

Powered by: