title: Consuming WCF using IIS
body: <p>I seem to be having issues consuming my WCF hosted on IIS.
  When going straight to it in the browser, I get the "Metadata publishing for this service is currently disabled." but all the steps it points out I should try, they don't work. Can anyone point me in the right direction as to how I can take another step on debugging it. My Web.config is below.
  (This is using WD Express 2010 if it makes a difference)</p>
  
  <p>Thanks.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="ServiceBehavior" name="Service"&gt;
          &lt;endpoint address="basic" binding="basicHttpBinding" name="httpEndPoint" contract="IService1"/&gt;
          &lt;endpoint address="json" binding="webHttpBinding" behaviorConfiguration="webBehavior" name="webEndPoint" contract="IService1"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost"/&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
  
          &lt;endpoint address="" binding="webHttpBinding" behaviorConfiguration="ServiceAspNetAjaxBehavior" contract="IService1"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost"/&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;
         &lt;/service&gt;
      &lt;/services&gt;
  
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="ServiceBehavior"&gt;
            &lt;serviceMetadata httpGetEnabled="true"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="ServiceAspNetAjaxBehavior"&gt;
            &lt;enableWebScript /&gt;
          &lt;/behavior&gt;
          &lt;behavior name="webBehavior"&gt;
            &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" aspNetCompatibilityEnabled="false"/&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>