Encrypt/Decrypt connection string in app.config

Topics: Cryptography Application Block, Data Access Application Block
Dec 27, 2011 at 12:14 PM
Edited Dec 27, 2011 at 12:14 PM

Dear All,

Is there any way to encrypt and decrypt encrypted connection string in app.config file using enterprise library.




Dec 28, 2011 at 12:53 AM

Yes, you can use Enterprise Library to encrypt connection strings.  You would use the configuration tool to encrypt the database settings section (which would also encrypt the connection strings section).  See Encrypting Configuration Data for more information.  Decryption is done automatically by the .NET runtime.

Randy Levy
Enterprise Library support engineer