Enterprise Libary Data block with encrypted password

Topics: Data Access Application Block, General discussion
May 23, 2008 at 5:20 PM
Can some body please help me with Enterprise library data block. I am using the data access layer with SQL Server 2005 without any problems. Only thing is I am using unencrypted password in the app.config file. Can somebody please tell me how can I use this block by encrypting the password in the app.config file.

Thanks in advance.
May 23, 2008 at 5:23 PM
I forgot to mention the enterprise library version. It is 2.0 with VS 2005.
May 23, 2008 at 6:24 PM
Edited May 23, 2008 at 6:25 PM

It's usually not recommended to use credentials when connecting to a SQL Server, favoring Integrated Security instead. However, if you still need to use credentials, you can encrypt the connection strings section. To encrypt the connection strings section (or any section for that matter), you can either use the standard configuration encryption tools or EntLib's configuration console to drive the encryption (although I don't recall whether this tooling support is available in v2.0).

Hope this helps,