title: Different bindings for the Same Contract
body: <p>I have a wcf service with operation contracts as below.</p>
  
  <pre><code>[OperationContract]       
  bool IsUserAvailable(string userName);
  
  [OperationContract]
  [WebInvoke(
      Method = "GET",
      ResponseFormat = WebMessageFormat.Json,
      UriTemplate = "CreateUser?userId={userId}")]
  bool CreateUser(string userId);
  </code></pre>
  
  <p>Note one is defined with webInvoke attribute. I have 2 applications that consume these methods. application 1 calls createUser method through http web request and application 2 ( wcf client ) directly calles IsUserAvailable .  If I try to define both basic http binding and webhttpBinding as in the web.config below - I run into issues.(A binding instance has already been associated to listen URI 'http://localhost:xxxx/BookStore.svc'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.) </p>
  
  <pre><code>  &lt;endpoint binding="basicHttpBinding" contract="BookStore.IBook" address=""&gt;&lt;/endpoint&gt;
  
    &lt;endpoint address=""
              binding="webHttpBinding"
              behaviorConfiguration="webBehavior"
              contract="BookStore.IBook" /&gt;
  
    &lt;endpoint address="mex"
                binding="mexHttpBinding"
                behaviorConfiguration="mexBehavior"
                contract="IMetadataExchange" /&gt;
  </code></pre>
  
  <p>My question is - How can I have different bindings for the same contract without running into issues. If I don't specify basichttp binding, I get the error ( no endpoint listening)</p>