【问题标题】:Is it possible to have to keys in a custom configsection with the same values?是否可以在自定义配置部分中键入具有相同值的键?
【发布时间】:2014-06-05 11:42:01
【问题描述】:

我的 app.config 中有以下内容:

<XPathFilter>
    <outbound>
     <filter **message="ProductChangeMessage"**  xpath="//acs:productDetails[acs:productType =  'Loan']" />
      <filter **message="ProductChangeMessage"**  xpath="//acs:productDetails[acs:productType = 'Test']" />
   </outbound>
</XPathFilter>

我有一组用于从这里读取元素的类...它们工作正常,除非 2 个过滤器具有相同的消息值。我明白了

System.Configuration.ConfigurationErrorsException:条目 'ProductChangeMes​​sage' 已添加。

不允许吗。

【问题讨论】:

    标签: c# app-config configurationsection


    【解决方案1】:

    答案是否定的。您收到的错误消息回答了您的问题。

    【讨论】:

      猜你喜欢
      • 2012-12-12
      • 2011-12-10
      • 1970-01-01
      • 2018-06-04
      • 1970-01-01
      • 2020-12-18
      • 2022-01-27
      • 2018-03-15
      • 1970-01-01
      相关资源
      最近更新 更多