title: How to define configs multiple endpoints for a WCF self-hosted service?
body: <p>I have two WCF Web API Contracts. Before this, I was happy that I could use TestClient. But after I implemented the second one I had to define endpoints (and could not use the default one) and after that, either I see nothing in browser or this message saying that "This XML file does not appear to have any style information associated with it." when I try to go to the endpoint address. It is the same when I try the config file (although I do not know how to set "EnableTestClient = true"). I really appreciate any help.</p>
  
  <pre><code>        var baseurl = new Uri("http://localhost:7000/api/v1.0");
          var config = new HttpConfiguration() { EnableTestClient = true };
          config.CreateInstance = (type, context, request) =&gt; container.Resolve(type);
          var host = new HttpServiceHost(typeof(ServiceAPI), config, baseurl);
  
          host.Description.Behaviors.Add(
              new ServiceMetadataBehavior() { HttpGetEnabled = true, HttpGetUrl = baseurl });            
  
          // Add MEX endpoint
          //host.AddServiceEndpoint(
          //  ServiceMetadataBehavior.MexContractName,
          //  MetadataExchangeBindings.CreateMexHttpBinding(),
          //  "mex"
          //);
  
          //host.AddServiceEndpoint(typeof(IStatAPI), new WebHttpBinding(), "/stat");
          //host.AddServiceEndpoint(typeof(IAlarmAPI), new WebHttpBinding(), "/alarm");            
  
          host.Faulted += (s, e) =&gt; Debug.WriteLine(e);            
  
          host.Open();
  </code></pre>