Note that there are some explanatory texts on larger screens.

plurals
  1. PORestrict client application to consume wcf service on only one endpoint
    primarykey
    data
    text
    <p>I have developed a wcf service having two contracts Contract1 and Contract2 exposed on two different endpoints. When i am going to add reference to my client application it allows me to consume both contracts.</p> <p>How i restrict client application to consume only one contract?</p> <p>here is my web.config's code</p> <pre><code>&lt;system.serviceModel&gt; &lt;services&gt; &lt;service behaviorConfiguration="MyWCFService.Service1Behavior" name="MyWCFService.Service1"&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost:1010/Service1.svc"/&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;endpoint address="/MyService1" binding="wsHttpBinding" contract="MyWCFService.IService1" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;endpoint address="/MyService2" binding="wsHttpBinding" contract="MyWCFService.IService2" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="MyWCFService.Service1Behavior"&gt; &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt; &lt;serviceMetadata httpGetEnabled="true"/&gt; &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --&gt; &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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