2

IISでホストされているWCFサービスがあるとすると、エンドポイントのアドレスを空にすることはできますか?WCFチュートリアルで例を見ました。

<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>

4

1 に答える 1

1

エンドポイントアドレスが空の場合、サービスをインスタンス化するときにServiceHostによって指定されたBaseAddressが使用されます。

于 2014-01-24T03:02:54.653 に答える