Reputation:
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
Reputation: 4684
If endpoint address is empty, it will use BaseAddress specified by the ServiceHost when you instantiate your service.
Upvotes: 1