title: WCF Error : Relative end point addresses
body: <p>Um quite new to WCF . I think I have messed up a bit. So this is what I did so far and I ve hosted my WCF service in IIS</p>
  
  <p>First the Contracts</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Runtime.Serialization;
  using System.ServiceModel;
  using System.ServiceModel.Web;
  using System.Text;
  using YangkeeServer.dto;
  
  namespace YangkeeServer
     {
  
  public class Service1 : IService1
  {
      [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "single")]
      public YangkeeTrailerDTO getTrailor()
      {
          return new YangkeeTrailerDTO()
          {
              loanFrom = "heaven"
          };
      }
  
  
      [WebInvoke(Method = "GET",
         ResponseFormat = WebMessageFormat.Json,
         UriTemplate = "datum/{id}")]
      public Test getName(string id)
      {
          return new Test()
          {
              Id = Convert.ToInt32(id) * 12,
              Name = "Leo Messi"
          };
      }
  }
  }
  </code></pre>
  
  <p>and this is my web.config file</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
  
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
  
      &lt;services&gt;
  
        &lt;service name="YangkeeServer.Service1"&gt;
  
          &lt;endpoint
            contract="YangkeeServer.IService1"
           binding="webHttpBinding"
           behaviorConfiguration="WebHttp"
           address="http://localhost:7000/Service1.svc"&gt;
         &lt;/endpoint&gt;
  
       &lt;/service&gt;
  
        &lt;service name="YangkeeServer.Service2"&gt;
  
         &lt;endpoint
            contract="YangkeeServer.IService2"
           binding="webHttpBinding"
           behaviorConfiguration="WebHttp"
           address="http://localhost:7000/Service2.svc"&gt;
         &lt;/endpoint&gt;
  
       &lt;/service&gt;
  
        &lt;service name="YangkeeServer.YangkeeTrailer"&gt;
  
          &lt;endpoint
            contract="YangkeeServer.IYangkeeTrailor"
            binding="webHttpBinding"
            behaviorConfiguration="WebHttp"
           address="http://localhost:7000/YangkeeTrailor.svc"&gt;
          &lt;/endpoint&gt;
  
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
         &lt;behavior name="WebHttp"&gt;
           &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name=""&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
     &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
   &lt;/system.serviceModel&gt;
   &lt;system.webServer&gt;
     &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
   &lt;/system.webServer&gt;
  
   &lt;/configuration&gt;
  </code></pre>
  
  <p>and um using this urlhttp://localhost:7000/Service1.svc and um getting this error</p>
  
  <pre><code>Server Error in '/' Application.
  
  When 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' is set to true     in configuration, the endpoints are required to specify a relative address. If you are specifying a     relative listen URI on the endpoint, then the address can be absolute. To fix this problem, specify a relative uri for endpoint 'http://localhost:7000/Service1.svc'.
  </code></pre>
  
  <p>can any one tell me where did I do wrong? Thank  you in advance.<img src="https://i.stack.imgur.com/jGnjv.png" alt="enter image description here"></p>