using System.Configuration;
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["defaultPath"].Value = value;
config.Save();
ConfigurationManager.RefreshSection("appSettings");

C# - write values to configuration file的更多相关文章

  1. Nginx - Configuration File Syntax

    Configuration Directives The Nginx configuration file can be described as a list of directives organ ...

  2. 转log4cxx: Could not read configuration file [log4cxx.properties]解决办法

    早上遇到了log4cxx: Could not read configuration file [log4cxx.properties].这个问题.网上搜索后发现是少了log4cxx.properti ...

  3. PostgreSQL Client Authentication Configuration File

    PostgreSQL: Documentation: 10: 16.4. Installation Procedure https://www.postgresql.org/docs/10/stati ...

  4. 解决Scala Play框架在Git Bash运行的异常:Could not find configuration file ../framework/sbt/sbt.boot.properties

    Git Bash+ConEmu可以模拟Linux强大的命令行.不过在结合Scala和Play时,需要注意如下事项: 1. Scala的安装在64位操作系统下,默认会放在“C:\Program File ...

  5. Error: Cannot open main configuration file '//start' for reading! 解决办法

    当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...

  6. phpmyadmin Wrong permissions on configuration file, should not be world writable!

    巴拉巴拉,实际场景是这样,因为有需要,所以想用django 做个rest服务给其他平台提供服务,发现以前正常的页面都无法运行,奇怪发现有一个页面提示连接不上mysql 难道mysql挂了,打开phpm ...

  7. springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件

    今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误: [2016-05-11 18:25:01,691] [WARN ] ...

  8. [Bug]IIs Cannot read configuration file due to insufficient permissions

    摘要 在部署站点的时候,遇到这样的问题Cannot read configuration file due to insufficient permissions 解决办法 在服务器上部署站点,浏览的 ...

  9. How to find configuration file MySQL uses?

    http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/ A customer called me today ...

随机推荐

  1. extern的困惑

    摘自:http://blog.csdn.net/fxjtoday/article/details/6021845 如果想明白为什么需要extern, 需要从编译和链接讨论起, 现代编译器一般采用按文件 ...

  2. 关于使用NotificationComat导致android2.3及以下版本无法显示自定义布局的解决方法.

    大伙都知道 android-support-v4为我们提供了很多兼容的解决方案, 其中就有关于通知栏的. NotificationCompat, 顺利成章操刀显示通知. eg: Intent inte ...

  3. C#_uploadify_mvc_version

    jQuery Uploadify在ASP.NET MVC3中的使用 1.Uploadify简介 Uploadify是基于jQuery的一种上传插件,支持多文件.带进度条显示上传,在项目开发中常被使用. ...

  4. bash的for循环从命令读取值

    bash的for循环可以很方便地从命令读取值,还可以指定分割值 下面的程序可以打印文件的内容,前面加上行号 #!/bin/bash # 打印每一行的内容,前面加行号 filename="/h ...

  5. laraval框架之数据库不可不吐槽的坑

    最近做的项目一直在用laraval框架,有些地方确实很方便,但是有些方面实在是太坑了,就比如这次在数据库里,官方文档写的是 Take note that email is not a required ...

  6. css笔记19:浮动的案例

    案例一: 1. 首先是01.html文件: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &q ...

  7. ASP.NET MVC ModelState

    添加一个模型状态: ModelState.Add("IamKey", new ModelState { Value = new ValueProviderResult(" ...

  8. 实现JavaScript的组成----BOM和DOM

    我们知道,一个完整的JavaScript的实现,需要由三部分组成:ECMAScript(核心),BOM(浏览器对象模型),DOM(文档对象模型). 今天主要学习BOM和DOM. BOM: BOM提供了 ...

  9. [改善Java代码] 推荐使用序列化实现对象的拷贝

    建议44: 推荐使用序列化实现对象的拷贝 上一个建议说了对象的浅拷贝问题,实现Cloneable接口就具备了拷贝能力,那我们来思考这样一个问题:如果一个项目中有大量的对象是通过拷贝生成的,那我们该如何 ...

  10. Spring 简单入门实例

    首先新建一个Web 项目 导入相应Jar 包 <?xml version="1.0" encoding="UTF-8"?> <beans xm ...