Configuration

  • Thread starter Thread starter Brian Stanforth
  • Start date Start date
B

Brian Stanforth

I am creating multiple applications (Web, Console,
WinForms) that I want to have common configuration
settings between them. I want to use the same
configuration file for all applications but I don't want
to use the machine.config file. I also am using custom
configuration wrappers that allow me to strongly type the
configuration settings as well as gain intellesense
(WebApp.ConnectionString). Is it possible to use just one
configuration file for all apps and to not use the
machine.config?
 
Brian:

Have you considered just using a Standard XML file? You could create a
DataSet out of it, and then use DataSet.WriteXML whenever it needs updated.
Then, place it in a share, encrypt it if you want and give each app the key
to decrypt it. Each time the app loads, use the ReadXML method of the
Dataset and that will stay with you through the session.

It will give you more flexibility and you can easily write to it
programatically.

HTH,

Bill
 
Back
Top