title: Endpoint not found WCF
body: <p>I have WCF library that I hosted , the login function work well, but the second function ReturnCounter</p>
  
  <p>the interface is : </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  using System.ServiceModel;
  using System.ServiceModel.Web;
  
  namespace PMAService
  {
      [ServiceContract]
      public interface IPMA
      {
          [OperationContract]
          string Login(string username, string password);
  
          [OperationContract]
          List&lt;usp_ReturnEncounter_Result&gt; ReturnEncounter();
  
  
  
      }
  }
  </code></pre>
  
  <p>and the code is </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.ServiceModel.Web;
  using System.Security.Cryptography;
  using System.Web.Security;
  
  namespace PMAService
  {
      public class PMA : IPMA
      {
  
          [WebInvoke(Method = "GET",
     ResponseFormat = WebMessageFormat.Json,
     UriTemplate = "LogIn/{username}/{password}")]
          public string Login(string username, string password)
          {
              if (Membership.ValidateUser(username, password))
                  return "true";
              else
                  return "false";
          }
  
          // Method to retrieve the Counter 
          [WebInvoke(Method = "GET",
  ResponseFormat = WebMessageFormat.Json,
  UriTemplate = "ReturnEncounter")]
          public List&lt;usp_ReturnEncounter_Result&gt; ReturnEncounter()
          {
              using (PMAEntities context = new PMAEntities())
              {
                return   context.usp_ReturnEncounter().ToList();
              }
          }
  
      }
  }
  </code></pre>
  
  <p>where I connect to Entity framework </p>
  
  <p>the web.config look like </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;appSettings/&gt;
    &lt;connectionStrings&gt;
  &lt;/connectionStrings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"/&gt;
      &lt;roleManager enabled="true" /&gt;
      &lt;membership&gt;
        &lt;providers&gt;
          &lt;remove name="AspNetSqlMembershipProvider"/&gt;
          &lt;add name="AspNetSqlMembershipProvider"
               type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
               connectionStringName="Login"
               enablePasswordRetrieval="false"
               enablePasswordReset="true"
               requiresQuestionAndAnswer="false"
               applicationName="/"
               requiresUniqueEmail="false"
               passwordFormat="Hashed"
               maxInvalidPasswordAttempts="5"
               minRequiredPasswordLength="1"
               minRequiredNonalphanumericCharacters="0"
               passwordAttemptWindow="10"
               passwordStrengthRegularExpression="" /&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
  
      &lt;authentication mode="Windows"/&gt;
      &lt;customErrors mode="On"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="PMAService.PMA"&gt;
          &lt;endpoint binding="webHttpBinding" contract="PMAService.IPMA" behaviorConfiguration="web"&gt;
          &lt;/endpoint&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="web"&gt;
            &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
    &lt;/system.serviceModel&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
    &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>the login/x/y work well, while ReturnCounter give the error endpoint not found </p>
  
  <p>any idea to fix that please </p>