title: VS2013 cannot add WCF service reference in solution
body: <p>I just created a WCF web site .net 3.5, I think by creting a default one would be enough to replicate. yet it is defficult to replicate. I have VS2013 with all updates as downloaded from my MSDN and I have windows 8.1.</p>
  
  <p>I must say, that a few months ago I was having the issue in some machines, so the other ones heleped and I was assuming it was something related with the installation, but now it is appearing on 3 different machines, one of them with windows 8. all of them 64 bits.</p>
  
  <p>The service is perfectly done, since that was until now my deliverable and on production, it is working smooth.</p>
  
  <p>Now I created a basic ASP.net aqlso .net 3.5. and tried to add the service reference and it shows the following message anfter failing to add it.</p>
  
  <blockquote>
    <p>There was an error downloading
    'http:// localhost:40226/HabeasDataService.svc/_vti_bin/ListData.svc/$metadata'.
    The request failed with HTTP status 404: Not Found. 
    Metadata contains a reference that cannot be resolved: 'http:// localhost:40226/HabeasDataService.svc'. T
    The remote server returned an unexpected response: (405) Method Not Allowed. 
    The remote server returned an error: (405) Method Not Allowed. 
    If the service is defined in the current solution, try building the solution and adding the service reference again.</p>
  </blockquote>
  
  <p>Of course I did the rebuild with a clena but the problem still persists.</p>
  
  <p>The configuration of the service is as follows</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;services&gt;
    &lt;service behaviorConfiguration="ServicesLayer.Service1Behavior"
      name="ServicesLayer.Service1"&gt;
      &lt;endpoint 
        bindingConfiguration="BigHttpBinding"
        name="BasicHttp"
        address="" 
        binding="basicHttpBinding" 
        contract="ServicesLayer.IHabeasDataService"&gt;
        &lt;identity&gt;
          &lt;dns value="localhost" /&gt;
        &lt;/identity&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="ServicesLayer.Service1Behavior"&gt;
        &lt;!-- To avoid disclosing metadata information, set the value below to false before deployment --&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
        &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding
        name="BigHttpBinding"
        maxBufferSize="65536"
        maxBufferPoolSize="65536"
        maxReceivedMessageSize="65536"
        transferMode="Buffered"&gt;
        &lt;readerQuotas
          maxDepth="64"
          maxStringContentLength="65536"
          maxArrayLength="65536"
          maxBytesPerRead="4096"
          maxNameTableCharCount="32768"/&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>I noticed about this line:</p>
  
  <pre><code>&lt;!-- To avoid disclosing metadata information, set the value below to false before deployment --&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
  </code></pre>
  
  <p>and try both configurations and still the same mistake.</p>
  
  <p>When I try running the svc file by clicking view in browser I get a 404.17 error like this.</p>
  
  <p><img src="https://i.stack.imgur.com/uq2T7.png" alt="enter image description here"></p>
  
  <p>It is very frustrating because it completely stalls development.</p>
  
  <p><strong>NOTE</strong>
  Everything related to IIS may be useful but remember it is IIS Express. Switching to local IIS anyway, still fails, but as I stated. On production server it is mint</p>