title: WCF Test Client cannot add service, cannot obtain metadata
body: <p>Can anyone tell me why I get this error when I try to add my service?</p>
  
  <blockquote>
    <p>Error: Cannot obtain Metadata from <a href="http://myserver/myapp" rel="nofollow noreferrer">http://myserver/myapp</a>. If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at <a href="http://go.microsoft.com/fwlink/?LinkId=65455" rel="nofollow noreferrer">http://go.microsoft.com/fwlink/?LinkId=65455</a>. WS-Metadata Exchange Error URI: <a href="http://myserver/myapp" rel="nofollow noreferrer">http://myserver/myapp</a> Metadata contains a reference that cannot be resolved: '<a href="http://myserver/myapp" rel="nofollow noreferrer">http://myserver/myapp</a>'.    The remote server returned an unexpected response: (405) Method Not Allowed.
      The remote server returned an error: (405) Method Not Allowed.HTTP GET Error URI: <a href="http://myserver/myapp" rel="nofollow noreferrer">http://myserver/myapp</a> There was an error downloading '<a href="http://myserver/myapp" rel="nofollow noreferrer">http://myserver/myapp</a>'. The request failed with HTTP status 403: Forbidden.</p>
  </blockquote>
  
  <p>Update: I have the following endpoint already,</p>
  
  <pre><code>&lt;endpoint address="mex" 
            binding="mexHttpBinding"
            name="Metadata"
            contract="IMetadataExchange" /&gt;
  </code></pre>
  
  <p>I also have the service behaviors set:</p>
  
  <pre><code>  &lt;serviceBehaviors&gt;
      &lt;behavior name="myBehavior"&gt;
        &lt;serviceMetadata httpGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  </code></pre>