User.config corruption

Does anyone know the reason for the "accidental" user.config corruption? I have a WinForms application affected by this issue on my client production line. Found the same problem online and a workaround , but I can't figure it out because this is happening.

0


a source to share


2 answers


I'm not sure why this is happening, but you're not alone, man! I've also tried different things to get around this. I wrote my own configuration handling classes with custom serialization. All I can tell you is better, but now it's still there.

Lately I've noticed that corruption seems to happen when the machine is rebooted (due to Windows updates, for example) while my application is running.



The next thing to try is to catch these shutdown events and try not to write to the config file in this situation.

0


a source


Have you tried it Properties.Setting.default.reset()

?



0


a source







All Articles