title: Service has zero application (non-infrastructure) endpoints
body: <p><strong>I'm aware to the fact that there are other questions with the same title. I tried their solutions to no avail</strong>.  </p>
  
  <p>I'm getting this message trying to start my service (Windows hosted) after registering it with <code>installutil</code>.<br>
  I have no experience with <code>WCF</code>, please be patient.</p>
  
  <p>My service application is composed of two projects: Externals, where I have my service interface, client interface, data contracts and app.config, and Internals, that contains the service implementation (which is the host, the actual implementation is done in another file which doesn't inherit from my service interface, I'm not sure if it's a good practice or not).<br>
  My app.config:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="Internals.ExecutionService" behaviorConfiguration="Default"&gt;
          &lt;endpoint name="TCPEndpoint" 
                    address="net.tcp://localhost:8080/ExecutionService" 
                    binding ="netTcpBinding" 
                    contract="Externals.IExecutionService"/&gt;
          &lt;endpoint address="mex" 
                    binding="mexTcpBinding" 
                    contract="IMetadataExhange"/&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="netTcp://localhost:8080/ExecutionService"/&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="Default"&gt;
            &lt;serviceMetadata httpGetEnabled="true"/&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 interface:  </p>
  
  <pre><code>using System.ServiceModel;
  
  namespace Externals
  {
      [ServiceContract(CallbackContract = typeof(IClientCallback))]
      public interface IExecutionService
      {
          /// &lt;summary&gt;
          /// Executes the mainflow.py file in the provided location.
          /// &lt;/summary&gt;
          /// &lt;param name="path"&gt;Path to the Python file.&lt;/param&gt;
          /// &lt;returns&gt;Execution status. Expected to return Passed/Failed onlt.&lt;/returns&gt;
          [OperationContract]
          ExecutionStatus Execute(string path);
  
          [OperationContract]
          ExecutionStatus GetStatus();
      }
  }
  </code></pre>
  
  <p>and the implementation (which is really not ready yet, I'm just trying to see if I can get a client to add a service reference):  </p>
  
  <pre><code>[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, IncludeExceptionDetailInFaults = true, ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)]
      public partial class ExecutionService : ServiceBase, IExecutionService
      {
          ServiceHost myHost;
          private IClientCallback callbackChannel;
  
          public ExecutionService()
          {
              InitializeComponent();
          }
  
          protected override void OnStart(string[] args)
          {
              myHost = new ServiceHost(typeof(ExecutionService));
              myHost.Open();
          }
  }
  </code></pre>
  
  <p>And empty implementations for the interface.</p>
  
  <p>The complete error:</p>
  
  <pre><code>Service cannot be started. System.InvalidOperationException: Service 'Internals.ExecutionService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
     at System.ServiceModel.Description.DispatcherBuilder.EnsureThereAreApplicationEndpoints(ServiceDescription description)
     at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
     at System.ServiceModel.ServiceHostBase.InitializeRuntime()
     at System.ServiceModel.ServiceHostBase.OnBeginOpen()
     at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open()
     at Internals.ExecutionService.OnStart(String[] args) in C:\Users...
  </code></pre>
  
  <p>Taken from event viewer.</p>