【问题标题】:Endpoints in other config file其他配置文件中的端点
【发布时间】:2013-04-04 08:00:36
【问题描述】:

我有一个 Web 应用程序,我想在其他配置文件(而不是 Web.config)中设置我的端点。这该怎么做?
我尝试在某些标签中设置属性configSource,但它不起作用。
Web.config 的结构:

<configuration>
  //Some configurations
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        //Some bindings
      </basicHttpBinding>
    </bindings>
    <client>
      //Endpoints
    </client>
  </system.serviceModel>
</configuration>

【问题讨论】:

    标签: .net asp.net-mvc web-config endpoint


    【解决方案1】:

    您应该尝试将configSource 属性放在客户端元素上。

    Visual Studio 会将其标记为错误(“不允许使用 configSource 属性。”),但无论如何它应该可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-04
      • 1970-01-01
      • 1970-01-01
      • 2019-10-21
      • 2020-02-04
      • 2015-06-29
      • 2014-10-26
      • 2019-09-30
      相关资源
      最近更新 更多