Custom Configuration Section can only be saved/modified while running as administrator?

我怕爱的太早我们不能终老 提交于 2019-12-02 04:20:27
Jeremy Thompson

I'm not a fan of using methods in the System.Configuration namespace to write to config files. Reading values using methods in the System.Configuration namespace is never a problem.

Just use LinqToXML instead, at least to check if that is the problem.

I'm guessing your app is installed in C:\Program Data so while it could be permissions related I suspect the root cause of the System.Configuration.ConfigurationErrorsException: Unable to save config to file is a lock on the file, use this code to check if that assumption is correct.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!