title: The target assembly contains no service types. You may need to adjust the Code Access Security policy of this assembly
body: <p>I have a small WCF solution with 2 methods but am getting this error when I build it.
  <br>If I leave the message without dismissing it, I get</p>
  
  <pre class="lang-none prettyprint-override"><code>WCF Service Host cannot find any service metadata. This may cause the client application to run improperly. Please check if metadata is enabled.
  </code></pre>
  
  <p>I'm pretty sure my config is wrong, probably the defined endpoint does not match the namespace but I'm not sure what to set where.</p>
  
  <p>The namespace of the Contracts class is <code>JOB_1_0_Service.Contracts</code> with 2 methods.
  In the <code>APP.Config</code> of this project is the following:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;endpoint address="/Address1" binding="wsHttpBinding" contract="JOB_1_0_Service.Contracts.IService"&gt;
  </code></pre>
  
  <p>The contract methods are defined as:</p>
  
  <pre><code>[ServiceContract]
  public interface IService
  {
      [OperationContract]
      GetNearbyJobsResponse GetNearbyJobs(GetNearbyJobsRequest request);
  
      [OperationContract]
      GetChildJobsResponse GetChildJobs(GetChildJobsRequest request);
  }
  </code></pre>
  
  <p>The namespace of the implementation class is <code>JOB_1_0_Service.Implementation</code> again with 2 methods:</p>
  
  <pre><code>GetNearbyJobsResponse IService.GetNearbyJobs(GetNearbyJobsRequest request)
  {
      ...
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>GetChildJobsResponse IService.GetChildJobs(GetChildJobsRequest request)
  {
      ...
  }
  </code></pre>
  
  <p>What should I put in which config file - if indeed this is the problem?</p>
  
  <p>[UPDATE]</p>
  
  <p>Ok, so just to re-iterate:
  I have 2 projects in 1 solution. 1 project contains the contracts and the other has the implementation code.</p>
  
  <p>This also means there are 2 config files. So far I don't know which one needs modding in what way.</p>
  
  <p>So, which is the one to modify, or do I need to modify both? I assume the implementation project is the one for the WCF config.</p>
  
  <p>I'm now in the situation where, when I build it says I have no metadata exposed, and yet it also tries (and fails) to expose a contract as an endpoint!</p>
  
  <p>[/UPDATE]</p>