Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>One endpoint = one contract. If you've combined your two sets of service methods into a <strong>single</strong> service contract (<code>ILocationService</code>), you <strong>cannot</strong> have two separate endpoints.</p> <p>What you should do is have one service implementation class (<code>LocationService</code>) that implements the two interfaces:</p> <pre><code>public class LocationService : ILocationsWCF, ILocationDW </code></pre> <p>Now, you have one service implementation, but you can define two separate endpoints:</p> <pre><code>&lt;services&gt; &lt;!-- the name= must exactly match the name of the concrete service implementation class --&gt; &lt;service name="PPS.Services.Location.LocationService" behaviorConfiguration="LocationServiceBehavior"&gt; &lt;!-- the contract= must exactly match the name of an existing service contract --&gt; &lt;endpoint name="PPS.Services.Location.LocationService" address="" behaviorConfiguration="HttpBehavior"&gt; binding="basicHttpBinding" bindingNamespace="PPS.Services.Location" bindingConfiguration="BasicHttpBinding_ILocationService" contract="PPS.Services.Location.LocationServiceDW" /&gt; &lt;!-- the contract= must exactly match the name of an existing service contract --&gt; &lt;endpoint name="PPS.Services.Location.LocationsWCF" address="someother" behaviorConfiguration="HttpBehavior" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ILocationsWCF" bindingNamespace="PPS.Services.Location" contract="PPS.Services.Location.ILocationsWCF" /&gt; &lt;/service&gt; &lt;/services&gt; </code></pre> <p>Now you have <strong>two endpoints</strong> - each one exposing <strong>one service contract</strong> - and mind you: they have to have <strong>different</strong> <code>address=.....</code> values! You cannot have two different endpoints on the same address</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload