title: WCF multiple end points on IIS and connecting to them separately
body: <p>Question:</p>
  
  <p>is there some way to access one end point without getting the details of the other end point?  That is to connect to one endpoint of a configured service without getting the details from all the end points of the service?</p>
  
  <p>I have configured 2 end points, with two different interfaces, and two different bindings, using the same class.   </p>
  
  <p>The web service is being hosted in IIS 7.5 on a window 7 test machine</p>
  
  <p>Excerpt from the <code>web.config</code> file:</p>
  
  <pre><code>&lt;bindings&gt;
    &lt;basicHttpBinding&gt;
       &lt;binding name="ServerUIBinding" 
                maxReceivedMessageSize="2097152" maxBufferSize="2097152" 
                sendTimeout="00:01:00" receiveTimeout="00:01:00"&gt;
       &lt;/binding&gt;
       &lt;binding name="ServerLinkBinding" 
                maxReceivedMessageSize="2097152" maxBufferSize="2097152"  
                sendTimeout="00:02:00" receiveTimeout="00:02:00"&gt;
       &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;services&gt;
    &lt;service name="APOServiceLibrary.ServerUI"
             behaviorConfiguration="DefaultMetaDataBehaviour"&gt;
      &lt;endpoint name="ServerUIEndPoint"
                address="/ServerUI"
                binding="basicHttpBinding"
                bindingConfiguration="ServerUIBinding"
                contract="APOServiceLibrary.IServerUI"&gt;
      &lt;/endpoint&gt;
      &lt;endpoint name="ServerLinkEndPoint"
                address="/ServerLink"
                binding="basicHttpBinding"
                bindingConfiguration="ServerLinkBinding"
                contract="APOServiceLibrary.IServerLink"&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="mexServer"
                binding="mexHttpBinding"
                contract="IMetadataExchange"&gt;
      &lt;/endpoint&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="DefaultMetaDataBehaviour"&gt;
        &lt;serviceMetadata httpGetEnabled="True"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="False"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p>I have configured the service as follows in a <code>ServerUI.svc</code> file:</p>
  
  <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="APOServiceLibrary.ServerUI" %&gt;
  </code></pre>
  
  <p>When I connect to the hosted site (the way I have it setup I can connect using the following URL: <code>http://localhost/test/serverui.svc</code>) using the <code>WcfTestClient.exe</code> tool, I can correctly see the breakdown of the two end points, and I can likewise see the wsdl definition if I browse to <code>http://localhost/test/ServerUI.svc?wsdl</code></p>
  
  <p>I've been reading here at stackoverflow that the address field in an end point (eg. address="/ServerLink") is relative to the IIS configured website and that it should be possible to connect to just one of the end points using this type of path:</p>
  
  <pre><code>http://localhost/test/ServerUI.svc/ServerLink
  </code></pre>
  
  <p>However, that does not seem to work with the <code>WcfTestClient.exe</code> tool. That is I cannot connect to <code>http://localhost/test/ServerUI.svc/ServerLink</code> with the tool. Nor can I browse to that site in a web browser. Additional I've tried making a new c# app and connecting to the web service using that address and it does not work.  Whenever I try this is always seems to generate this type of error </p>
  
  <blockquote>
    <p>Error: Cannot obtain Metadata from Cannot obtain Metadata from
    <code>http://localhost/test/ServerUI.svc/ServerLink</code> If this is a Windows (R)
    Communication Foundation service to which you have access, please
    check that you have enabled metadata publishing at the specified
    address.</p>
  </blockquote>
  
  <p>So, back to my question, is there some way to do this? That is connect to only one of the end points and get the definition for it? Is there something different I have to do with <code>MetadataExchange</code> to generate data for each end point separately? Is there something in the <code>.svc</code> file I can configure to do so?</p>
  
  <p>The reason I would like to do so is to provide some of our other teams with a "cleaner" interface with less methods, and less sensitive to large dataset timeouts (that's the extra minute timeout of ServerLink)  </p>
  
  <p>A solution I have considered is making a wrapper class and using that to create a separate svc file so that a completely separate URL would be used, but that seems like a poor solution.</p>