[英]XML Config, How can I read a configuration file with a list/array of values rather than a single value
[英]Is there a way to set configuration runtime options in code rather than in the config file?
我正在编写一个 .NET 应用程序,我想将enforceFIPSPolicy
选项设置为 false,但我想在代码中而不是在配置文件(app.config 或 web.config)中执行此操作。 这可能吗?
这是它应该在配置文件中的样子:
<configuration>
<runtime>
<enforceFIPSPolicy enabled="false"/>
</runtime>
</configuration>
不会。 web/app.config
在应用程序启动时加载一次。 更改文件的值将无效。
如果没有这样的 API 在运行时更改值,恐怕你没有选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.