title: Custom UserNamePasswordValidator not called
body: <p>I am trying to set up a WCF webservice with BasicHttpBinding and authentication using username/password. I made custom authentication class. However, it is never called (verified by debugging). This is my web.config:</p>
  
  <pre><code>  &lt;system.serviceModel&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior&gt;
        &lt;serviceCredentials&gt;
          &lt;userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Compareware_WebApp.webservices.AuthenticationValidator, Compareware_WebApp" /&gt;
        &lt;/serviceCredentials&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="BasicHttpBinding"&gt;
        &lt;security mode="TransportCredentialOnly"&gt;
          &lt;message clientCredentialType="UserName" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;services&gt;
    &lt;service name="Compareware_WebApp.webservices.Accounts"&gt;
      &lt;endpoint address="/webservices/Accounts.svc" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding" name="BasicEndpoint"
        contract="Compareware_WebApp.webservices.IAccounts" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;client /&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is my authentication class:</p>
  
  <pre><code>namespace Compareware_WebApp.webservices
  </code></pre>
  
  <p>{</p>
  
  <pre><code>public class AuthenticationValidator : UserNamePasswordValidator
  {
      public override void Validate(string userName, string password)
      {
          if (null == userName || null == password)
          {
              throw new ArgumentNullException();
          }
  
          if (!Membership.ValidateUser(userName, password))
          {
              // This throws an informative fault to the client.
              throw new FaultException("Unknown Username or Incorrect Password");
          }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>What am I doing wrong?</p>