Editing web.config via .aspx Site or web.control

Editing web.config via .aspx Site or web.control

Post by M. Denkmaie » Tue, 25 Jun 2002 15:55:07



Hi all,

ive got a problem with editing the web.config file by changing values via a
webform and writing it back using the writeXML methods.

I make a lookup of the web.config file by reading and binding its values
with the ReadXML method of the DataSet.
Primarily i want to change the key / value pairs of the appSettings section,
of course.
After changing its values, i want to write back these values to the origin
web.config file but it seems not to work.
The only changes i can see, are changes for key /  value pairs, where th
value is "0" before updating. After an update to the XML file it is 1, but
all other changes are not executed.
Trying to change back the value from "1" to "0" also fails - with the same
piece of code.

Please help

sincerly yours

Matthew D.

 
 
 

Editing web.config via .aspx Site or web.control

Post by M. Denkmaie » Tue, 25 Jun 2002 16:40:41


Hi all,

ive already got it. I reloaded the DataGrid on every roundtrip before i
called the Write METHOD, so every Change was recovered before writing to the
XML File.

sincerly yours Matthew D.



Quote:> Hi all,

> ive got a problem with editing the web.config file by changing values via
a
> webform and writing it back using the writeXML methods.

> I make a lookup of the web.config file by reading and binding its values
> with the ReadXML method of the DataSet.
> Primarily i want to change the key / value pairs of the appSettings
section,
> of course.
> After changing its values, i want to write back these values to the
origin
> web.config file but it seems not to work.
> The only changes i can see, are changes for key /  value pairs, where th
> value is "0" before updating. After an update to the XML file it is 1, but
> all other changes are not executed.
> Trying to change back the value from "1" to "0" also fails - with the same
> piece of code.

> Please help

> sincerly yours

> Matthew D.