Home All Groups Group Topic Archive Search About

.config files are getting corrupted

Author
30 Mar 2010 5:26 AM
Raja
In VB.Net, .config files are getting corrupted, when the system goes down due
to some powere failure or some other reason. what could be solution to
prevent those files ?

Thanks,
Rajan

Author
30 Mar 2010 8:41 AM
Andrew Morton
Raja wrote:
> In VB.Net, .config files are getting corrupted, when the system goes
> down due to some powere failure or some other reason. what could be
> solution to prevent those files ?

Run the computer from a UPS (and configure the computer to shut down when
the UPS battery is getting low). Otherwise, the PSU could get damaged, which
could conceivably lead to a fire, in which case corrupted files would be the
least of your worries.

--
Andrew
Author
30 Mar 2010 12:33 PM
Cor Ligthert[MVP]
Raja,

Corrupted or not completely updated?  There is always a chance whatever file
gets corrupted at a power break and then only the solution Andrew describes
is correct.

However, a config file is always written completely. So the change that it
is corrupt is low. (It can contain the wrong information, so you have
probably to update it more often)

Cor

Show quoteHide quote
"Raja" <R***@discussions.microsoft.com> wrote in message
news:BEA8D059-C532-44D9-915C-F18894BE0501@microsoft.com...
> In VB.Net, .config files are getting corrupted, when the system goes down
> due
> to some powere failure or some other reason. what could be solution to
> prevent those files ?
>
> Thanks,
> Rajan
Author
31 Mar 2010 12:43 PM
Jason Keats
Raja wrote:
> In VB.Net, .config files are getting corrupted, when the system goes down due
> to some powere failure or some other reason. what could be solution to
> prevent those files ?
>
> Thanks,
> Rajan

You should not be writing to .config files. Therefore, it's impossible
to corrupt them.