Looking for automatic .config file modifier

Looking for automatic .config file modifier

am 14.01.2008 15:41:41 von DC

Hi,

before I start to program a tool from scratch I wanted to check if
somebody knows an existing solution: we often have the demand to
modify a certain config value in many .config (web.config and
Enterprise Library config - yes we still use them) files. For example:
change pdf01 to pdf02 in many
web applications with different paths. It's not an xcopy scenario
since the configs differ on the different servers, they just have some
settings in common. So it is required that one is able to configure
the xml file path and the config value's xpath for every entry.

Ideally we would use a web frontend to switch between configured
values and push a button to modify all the values. Since we are
talking about plain xml manipulation: does anybody use such a tool?

TIA for any ideas,
Regards
DC

RE: Looking for automatic .config file modifier

am 14.01.2008 21:37:01 von pbromberg

There are classes in System.Configuration for handling this kind of task,
however I do not recall seeing any specific "tools" to do this. It's just an
Xml Document, so loading, modifying via XPATH and re-saving are not a big
deal.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"DC" wrote:

> Hi,
>
> before I start to program a tool from scratch I wanted to check if
> somebody knows an existing solution: we often have the demand to
> modify a certain config value in many .config (web.config and
> Enterprise Library config - yes we still use them) files. For example:
> change pdf01 to pdf02 in many
> web applications with different paths. It's not an xcopy scenario
> since the configs differ on the different servers, they just have some
> settings in common. So it is required that one is able to configure
> the xml file path and the config value's xpath for every entry.
>
> Ideally we would use a web frontend to switch between configured
> values and push a button to modify all the values. Since we are
> talking about plain xml manipulation: does anybody use such a tool?
>
> TIA for any ideas,
> Regards
> DC
>

Re: Looking for automatic .config file modifier

am 14.01.2008 22:25:11 von sloan

If you really really want to dig and look.

StockTrader Application is a WCF app. Greg Leake is the author.

However, put aside the wcf stuff, and he has a "db values to .config files"
stuff.

Its in its infancy, but is a framework...basically if you wanted to deploy
settings to alot of different machines.
Aka, if you have 100 servers in a web farm, you'd want to consider his code
and/or approach.

msdn.microsoft.com/stocktrader/

Again, its in its infancy. Find the simple settings or something like that
code.

COMPANY_NAME or something like that might be an item to look for in the
source code.

He also has 2 videos on channel9 , so you can watch those.

...



"DC" wrote in message
news:ccb9a350-4c8a-48f5-a476-9754b38af9a9@q39g2000hsf.google groups.com...
> Hi,
>
> before I start to program a tool from scratch I wanted to check if
> somebody knows an existing solution: we often have the demand to
> modify a certain config value in many .config (web.config and
> Enterprise Library config - yes we still use them) files. For example:
> change pdf01 to pdf02 in many
> web applications with different paths. It's not an xcopy scenario
> since the configs differ on the different servers, they just have some
> settings in common. So it is required that one is able to configure
> the xml file path and the config value's xpath for every entry.
>
> Ideally we would use a web frontend to switch between configured
> values and push a button to modify all the values. Since we are
> talking about plain xml manipulation: does anybody use such a tool?
>
> TIA for any ideas,
> Regards
> DC

Re: Looking for automatic .config file modifier

am 15.01.2008 12:29:24 von DC

On 14 Jan., 22:25, "sloan" wrote:
> If you really really want to dig and look.
>
> StockTrader Application is a WCF app. =A0Greg Leake is the author.
>
> However, put aside the wcf stuff, and he has a "db values to .config files=
"
> stuff.
>
> Its in its infancy, but is a framework...basically if you wanted to deploy=

> settings to alot of different machines.
> Aka, if you have 100 servers in a web farm, you'd want to consider his cod=
e
> and/or approach.
>
> msdn.microsoft.com/stocktrader/
>
> Again, its in its infancy. =A0Find the simple settings or something like t=
hat
> code.
>
> COMPANY_NAME or something like that might be an item to look for in the
> source code.
>
> He also has 2 videos on channel9 , so you can watch those.
>
> ..
>
> "DC" wrote in message
>
> news:ccb9a350-4c8a-48f5-a476-9754b38af9a9@q39g2000hsf.google groups.com...
>
>
>
> > Hi,
>
> > before I start to program a tool from scratch I wanted to check if
> > somebody knows an existing solution: we often have the demand to
> > modify a certain config value in many .config (web.config and
> > Enterprise Library config - yes we still use them) files. For example:
> > change pdf01 to pdf02 in many
> > web applications with different paths. It's not an xcopy scenario
> > since the configs differ on the different servers, they just have some
> > settings in common. So it is required that one is able to configure
> > the xml file path and the config value's xpath for every entry.
>
> > Ideally we would use a web frontend to switch between configured
> > values and push a button to modify all the values. Since we are
> > talking about plain xml manipulation: does anybody use such a tool?
>
> > TIA for any ideas,
> > Regards
> > DC- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Thank you, sloan, I will have a look.

Regards
DC

Re: Looking for automatic .config file modifier

am 15.01.2008 12:30:06 von DC

On 14 Jan., 21:37, Peter Bromberg [C# MVP]
wrote:
> There are classes in System.Configuration for handling this kind of task,
> however I do not recall seeing any specific "tools" to do this. It's just an
> Xml Document, so loading, modifying via XPATH and re-saving are not a big
> deal.
> -- Peter
> Site:http://www.eggheadcafe.com
> UnBlog:http://petesbloggerama.blogspot.com
> MetaFinder:http://www.blogmetafinder.com
>
>
>
> "DC" wrote:
> > Hi,
>
> > before I start to program a tool from scratch I wanted to check if
> > somebody knows an existing solution: we often have the demand to
> > modify a certain config value in many .config (web.config and
> > Enterprise Library config - yes we still use them) files. For example:
> > change pdf01 to pdf02 in many
> > web applications with different paths. It's not an xcopy scenario
> > since the configs differ on the different servers, they just have some
> > settings in common. So it is required that one is able to configure
> > the xml file path and the config value's xpath for every entry.
>
> > Ideally we would use a web frontend to switch between configured
> > values and push a button to modify all the values. Since we are
> > talking about plain xml manipulation: does anybody use such a tool?
>
> > TIA for any ideas,
> > Regards
> > DC- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Thank you Peter, that's what I thought has to be done.

Regards
DC