write in configuration file with entlib3.0

Topics: General discussion
Feb 6, 2007 at 5:31 PM
Edited Feb 6, 2007 at 5:33 PM
Hi, I'm trying to write on configuration file with entlib 3.0 but a got the message: "The configuration is read only."

Im follow this article: http://geekswithblogs.net/akraus1/articles/64871.aspx

Here it my solution you take a look on it http://uooopaa.googlepages.com/config.zip

I did search some example where show the way to do it, but I find examples without using entlib.

I appreciate you help
Dario Quintana
Feb 12, 2007 at 3:54 PM
I have not tried it that way so I am unsure of the problem.

My recommendation is to look at the Application Block Software Factory that comes with Enterprise Library 3.0 if you are interested in manipulating the configuration file as recommended in Enterprise Library.

The Application Block Software Factory helps you modify and extend Enterprise Library by providing you guidance on creating new providers for existing blocks and creating entirely new application blocks.

Part of that guidance generates code for you to read and write configuration information. The code seems simpler than what you are attempting and it is already generated for you. You just need to create properties on your providers to make sure your new information is serialized and map it to provider nodes that are displayed in the Configuration Tool.

Hope this helps.



David Hayden
Microsoft MVP C#