user1108948
user1108948

Reputation:

Why sometimes endpoint address is empty

Suppose I have a WCF Service hosted in IIS, can the address in endpoint be empty? I saw an example at 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>

Upvotes: 2

Views: 2754

Answers (1)

Eternal21
Eternal21

Reputation: 4684

If endpoint address is empty, it will use BaseAddress specified by the ServiceHost when you instantiate your service.

Upvotes: 1

Related Questions