469,645 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Microsoft Enterprise Configuration blovck - 2 applications, 1 conf


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
1 1034

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! - www.microsoft.com/security
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.

Similar topics

3 posts views Thread by James | last post: by
1 post views Thread by Novice | last post: by
14 posts views Thread by Jim Hubbard | last post: by
8 posts views Thread by poifull | last post: by
1 post views Thread by dirk.dircksen | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.