title: How Do I configure Multiple Service Endpoints in WCF?
body: <p>I'd like some basic guidance on setting up my WCF configuration. 
  This is my first serious effort with WCF (and first post on 
  stackoverflow).</p>
  
  <p>I have a WCF class library (APILibrary) that I am referncing in
  my web project. In the wcf library, I currently have two 
  services - IAuthService and ITradeService. </p>
  
  <p>Along these lines, I have three questions:</p>
  
  <p>1) <strong>My problem (and the original reason for this post) is</strong> that when I 
  compile my application I am able to call TradeServiceCient but not 
  AuthServiceClient in my web app. The latter does not appear in the intellisense. 
  I have a feeling that it has to do with the fact that they are sharing 
  the same port (and only one endpoint got included) but I am obviously 
  unclear.</p>
  
  <p>2) I am attempting to expose two service endpoints at the same time (and, 
  likely a few more) while I develop and test. When I move over to staging
  and hosting, each endpoint will have its own address. Until then, how do 
  I do this (I have a feeling this relates to my question above)? </p>
  
  <p>3) I am noticing in a lot of posts people have examples of the "client"
  and "server" "system.serviceModel" code. Are these unique files or tags
  in the App.config file that resides in my WCF library? What is each doing?
  Currently, I think I just have the server side?</p>
  
  <p>Here is what I currently have in my App.config file (in my WCF Library):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" /&gt;
    &lt;/system.web&gt;
    &lt;!-- When deploying the service library project, the content of the config file must be added to the host's 
    app.config file. System.Configuration does not support config files for libraries. --&gt;
    &lt;system.serviceModel&gt;
      &lt;client /&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="ApiLibrary.ApiBehavior" name="SpoonSys.Api.Trade.TradeService"&gt;
          &lt;endpoint address="" binding="wsHttpBinding" contract="SpoonSys.Api.Trade.ITradeService"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost:8731" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost:8731/Design_Time_Addresses/ApiLibrary/Trade/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
  
        &lt;service behaviorConfiguration="ApiLibrary.ApiBehavior" name="SpoonSys.Api.Authentication.AuthService"&gt;
          &lt;endpoint address="" binding="wsHttpBinding" contract="SpoonSys.Api.Authentication.IAuthService"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost:8731" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost:8731/Design_Time_Addresses/ApiLibrary/Authentication/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;  
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="ApiLibrary.ApiBehavior"&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="True" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My configuration is ASP.NET / Framework 3.5 / VS 2008 / C#</p>