title: WCF cannot configure WSDL publishing
body: <p>I want to enable WSDL retrieval for a webservice that I created. I can 'call' the webservice through the .svc file that I made:</p>
  
  <p><strong>http://localhost/test.svc</strong></p>
  
  <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="Project.MyService" CodeBehind="MyService.svc.cs" %&gt;
  </code></pre>
  
  <p>Calling the page gives the standard .NET message saying "Metadata publishing for this service is currently disabled." with instructions to enable publishing.</p>
  
  <p><strong>I followed instructions and added the web.config entries, however calling <a href="http://localhost/test.svc?wsdl" rel="nofollow">http://localhost/test.svc?wsdl</a> produces the same result... How can I enable WSDL publishing for my webservice?</strong></p>
  
  <p><strong>web.config entries</strong></p>
  
  <p>
      </p>
  
  <pre><code>  &lt;service name="Project.IMyService" behaviorConfiguration="MyServiceTypeBehaviors" &gt;
      &lt;endpoint contract="IMetadataExchange" binding="mexHttpBinding" 
                address="mex"
                /&gt;
      &lt;host&gt;
        &lt;baseAddresses&gt;
          &lt;add baseAddress="http://localhost/test.svc"/&gt;
        &lt;/baseAddresses&gt;
      &lt;/host&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="MyServiceTypeBehaviors"&gt;
        &lt;serviceMetadata httpGetEnabled="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p></p>