title: WCF- Meta Data Exchange Configuration
body: <p>I have defined two endpoints  in my App.Config file as</p>
  
  <pre><code> &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service 
                name="HostDirectAddress.ITestService" 
                behaviorConfiguration="behaviorConfig"&gt;
  
        &lt;endpoint 
                  address="net.tcp://localhost:9000/ITestService"
                  binding="netTcpBinding"
                  contract="HostDirectAddress.ITestServiceContract"/&gt;
  
      &lt;endpoint
                  address="http://localhost:9000/mex"
                  binding="mexHttpBinding"
                  contract="IMetadataExchange" /&gt;
  
      &lt;/service&gt;
     &lt;/services&gt;
          &lt;behaviors&gt;
             &lt;serviceBehaviors&gt;
              &lt;behavior name="behaviorConfig"&gt;
                &lt;serviceMetadata httpGetEnabled="true"/&gt;
                &lt;serviceDebug includeExceptionDetailInFaults="True"/&gt;
              &lt;/behavior&gt;
            &lt;/serviceBehaviors&gt;
   &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p><strong>My client calls</strong></p>
  
  <pre><code>static void Main(string[] args)
  {
        ServiceHost host = 
          new ServiceHost(typeof(HostDirectAddress.ITestService));
        host.Open();
        Console.WriteLine("....Service is Ready to Consume...");
        Console.ReadLine();
   }
  </code></pre>
  
  <p><strong>I received the following error when i try to launch the host</strong></p>
  
  <p><em>The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address.  Either supply an http base address or set HttpGetUrl to an absolute address.</em></p>
  
  <p>How to fix it?</p>