Encrypting winform app.config with enterprise library 5.0

Topics: General discussion
Jul 26, 2010 at 6:02 PM
I am trying to use the encryption capability of the Enterprise Library 5.0 in my app.config for the connection string and other data. This works great on my dev laptop, but it will not work on other computers. I have read that this is an issue with winforms only, and that asp.net works fine. I found this http://www.dotnetprofessional.com/blog/post/2008/03/03/Encrypt-sections-of-WebConfig-or-AppConfig.aspx I was just wondering if that is still the case for winforms in Ent Lib 5? Does the above method have to be done or is there an easier way? Thanks Chad
Jul 27, 2010 at 8:11 AM

Here's a related thread http://entlib.codeplex.com/Thread/View.aspx?ThreadId=10300 see if it may help.

Gino Terrado
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jul 27, 2010 at 11:38 PM

So the answer is that nothing has been done to resolve this issue?  We still have to band-aid the app to make it work.

Jul 28, 2010 at 3:13 AM

Actually, the issue with winforms is not an issue caused by the functionality of EntLib. (And an easy workaround as mentioned in the link you posted is to rename the app.config to web.config. ) The tool that was used is the Aspnet_regiis tool.  You can encrypt an app.config or web.config file using EntLib 5.0.  The Aspnet_regiis tool will be involved when you need to deploy your application to other machines specifically for exporting and importing key files.  I mentioned the steps here, let me know if anything is unclear.

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@Avanade.com