Using Enterprise Library with Thick Client Win Forms application

Topics: Enterprise Library Core, General discussion
Oct 20, 2008 at 2:39 PM
I have a thick client WinForm application. I am beginning to integrate the Enterprise Library with my application, as it has grown to a extent that it is becoming a problem to maintain and add modules to it. However, there are 2 problems I am facing. The basis of both the problems is that the clients need to read the configuration information from the Server for easy manageability. The problems are:

1) I read somewhere that the EntLib stores the Keys it uses to encrypt the configuration in machine.config. Is it possible to supply the EntLib with these keys from the application itself, as it would be simply infeasible to go out to each client and update its machine.config with the keys.

2) Secondly, I want to store the configuration information (the config files) on the server only. Again, it would be infeasible to copy the config files to each client, and simply impossible to update each client as and when the configuration information changes. Again, is it possible to programatically request the EntLib to read the configuration information from the specified location???
Oct 22, 2008 at 3:32 PM
Please help, this is really important for me.

I had an after-thought after posting the thread. Is it possible to supply the Configuration information to the Application Blocks programatically. I am using the latest 4.0 release.

There is a class "ResourceStringLoader" in the Common assembly. I already fetch information from the server in the application's StartUp Event. Would it be possible to simultaneously fetch the Application Blocks' configuration information from the server & feed it to this or some other class in the Enterprise Library enabling the Blocks to load themselves up.
Oct 23, 2008 at 1:41 PM
Hi, I'm no expert in this matter but I think this threads will help you.

You can also try going through the documentation, Developing Applications With Enterprise Library -> Configuring Enterprise Library -> Using Alternate Configuration Sources
Oct 23, 2008 at 3:20 PM
cshark, although I am trying to figure out whether I can get something useful from the Threads you have pointed to (especially from the one suggesting to use SqlConfigurationSource), still my initial study of these reveals that I would need to modify my application Design in some way to use any alternate Config source.

I am putting my requirement once again as precisely as possible (I believe other developers at some point would have also had this requirement):

Is it possible to supply a string containing XML EntLib configuration to some class in the Library, using which the Library configures all the Blocks whose configuration has been supplied??? I believe this should be possible, as the Library itself reads the information from app.config as a string. So, if we pass this information to the Library programatically at a suitable point (say in ApplicationStart event), it should be possible for the Library to initialize itself appropriately.