【问题标题】:app.config on other location than the location of .exeapp.config 位于 .exe 位置以外的其他位置
【发布时间】:2016-06-08 04:52:42
【问题描述】:

我有一个默认安装在程序文件夹中的 WPF 应用程序。

在运行时,app.config 文件被修改并保存。基于此修改,企业库记录应用程序日志记录。

但在 windows 10 机器上,由于安全问题,app.config 文件的修改没有保存。

我尝试了以下选项,但企业库继续从原始位置读取 app.config。

AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", _tempFolderPath + "\DMSShell.exe.config");

有什么建议吗?

【问题讨论】:

    标签: .net app-config


    【解决方案1】:

    看看Configuration.Savehttps://msdn.microsoft.com/en-us/library/ms134088(v=vs.110).aspx

    请查看该页面上有关 ACL 的注释,以确保您拥有正确的用户许可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-13
      • 1970-01-01
      相关资源
      最近更新 更多