title: Consuming WCF Service Reference: Endpoint not found / 404 page not found
body: <p><em>Hi, I know this topic might look familiar to similar topic but I can tell you that it is after an entire day of searching on related issues that I come for help, because none of the suggested solutions has worked for me.</em></p>
  
  <p>I have created a <strong>WCF REST Service Application</strong> with only one service that runs locally on my computer as well as a <strong>ASP.NET WebForm Client</strong> that consumes it (both on individual instance of VS 2013 on a Windows 7).</p>
  
  <p>All the operations of the service work perfeclty fine.</p>
  
  <ul>
  <li><em>GET</em> operations can be successfully tested in the browser</li>
  <li><em>POST</em> operations can be successfully tested using Postman browser extension.</li>
  </ul>
  
  <p><strong>Problem</strong>: When I try to access this service using a Service Reference on the client such as:</p>
  
  <pre><code>AuthorRESTServiceClient service = new AuthorRESTServiceClient("AuthorServiceBinding");
  string value = service.Test(); //GET operation that should return a "Hello World"
  </code></pre>
  
  <p>the client then throws an <code>EndpointNotFoundException</code>:</p>
  
  <blockquote>
    <p>There was no endpoint listening at
    <a href="http://localhost:49414/AuthorRESTService.svc" rel="nofollow">http://localhost:49414/AuthorRESTService.svc</a> that could accept the
    message. This is often caused by an incorrect address or SOAP action.
    See InnerException, if present, for more details.</p>
  </blockquote>
  
  <p>And contains an inner <code>WebException</code>:</p>
  
  <blockquote>
    <p>The remote server returned an error: (404) Not Found</p>
  </blockquote>
  
  <p>Here is the partial code of the <strong>WCF Service Application</strong> server's <strong>Web.config</strong>:</p>
  
  <pre><code>  &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="WCFAuthorEntryService.AuthorRESTService"&gt;
          &lt;endpoint address=""
                    binding="webHttpBinding"
                    contract="WCFAuthorEntryService.IAuthorRESTService"
                    behaviorConfiguration="web"&gt;
          &lt;/endpoint&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="web"&gt;
            &lt;webHttp/&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;protocolMapping&gt;
        &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
      &lt;/protocolMapping&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
  </code></pre>
  
  <p>And here's the partial code of the <strong>ASP.NET Webform</strong> client's <strong>Web.config</strong></p>
  
  <pre><code>  &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="AuthorServiceBinding"/&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;endpoint address="http://localhost:49414/AuthorRESTService.svc"
                  binding="basicHttpBinding"
                  bindingConfiguration="AuthorServiceBinding"
                  contract="AuthorServiceReference.IAuthorRESTService"
                  name="AuthorServiceBinding"/&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>What am I doing wrong? Any help would be much appreciated.</p>