【问题标题】:Why sometimes endpoint address is empty为什么有时端点地址为空
【发布时间】:2012-11-29 04:36:59
【问题描述】:

假设我有一个托管在 IIS 中的 WCF 服务,端点中的地址可以为空吗? 我在WCF Tutorial.看到了一个例子

<system.serviceModel>
<services>
  <service name="MathService"
    behaviorConfiguration="MathServiceBehavior">
    <endpoint address="" contract="IMathService"
      binding="wsHttpBinding"/>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="MathServiceBehavior">
      <serviceMetadata httpGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

【问题讨论】:

    标签: wcf iis web-config wcf-binding


    【解决方案1】:

    如果端点地址为空,它将使用 ServiceHost 在实例化服务时指定的 BaseAddress。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-11
      • 1970-01-01
      • 1970-01-01
      • 2010-09-21
      • 1970-01-01
      • 2011-02-15
      • 1970-01-01
      相关资源
      最近更新 更多