By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,016 Members | 1,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,016 IT Pros & Developers. It's quick & easy.

Microsoft Enterprise Configuration blovck - 2 applications, 1 conf

P: n/a

I used the microsoft configuration block to store settings for applications
in the past and this worked fine. But now I have the following situation and
I do not know how to solve this:

I want to write a windows service that stores its settings in a xml file
using the configuration block. And I want to write a windows forms
application that manages the service. Stop,start and modify the settings.

So both applications will use the same configuration file. Is this possible
with the microsoft configuration block, and how?
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Configuration Application Block

Design of the Configuration Application Block
The Configuration Application Block was designed to achieve the following

To provide a simple interface for both reading and writing configuration
To insulate applications from the physical storage location of the
configuration data
To provide an extensible model that allows for custom storage locations and
the run-time representation of configuration settings
Design Highlights

Because by default the Configuration Application Block know where to store
the data.
The Configuration Application Block includes one provider that supports
this interface, XmlFileStorageProvider, which reads and writes
configuration data to an XML file.
If you wants to customize the behavior, you need to write your own Storage
Provider, so that you can make the two application which call the same
storage provider to negotiate about how the sync the data from two
applications, e.g, you can make them store data in the same databse so that
there is only one copy of data.

For detailed implement, please check the source code of
XmlFileStorageProvider in the Configuration Application Block.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! -
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.