title: An error occurred when verifying security for the message
body: <p>When I try to call a WCF service I am getting the following message "An error occurred when verifying security for the message."</p>
  
  <p>When I remove the custom authenication the service works no problem. I can't figure out though what I have misconfigured in my web.config.  Any insight would be appreciated.</p>
  
  <pre><code>  &lt;system.serviceModel&gt;
       &lt;services&gt;
          &lt;service behaviorConfiguration="NAThriveExtensions.nableAPIBehavior"
            name="NAThriveExtensions.nableAPI"&gt;
             &lt;endpoint 
               address="" 
               binding="basicHttpBinding" 
               bindingConfiguration="basicHttpBinding_Secure"
               contract="NAThriveExtensions.InableAPI"&gt;
             &lt;/endpoint&gt;
             &lt;endpoint 
               address="mex" 
               binding="mexHttpsBinding" 
               contract="IMetadataExchange" /&gt;
          &lt;/service&gt;
       &lt;/services&gt;
       &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
            &lt;behavior name="NAThriveExtensions.nableAPIBehavior"&gt;
              &lt;serviceMetadata httpsGetEnabled="true" /&gt;
              &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
              &lt;serviceCredentials&gt;
                &lt;userNameAuthentication 
                  userNamePasswordValidationMode="Custom" 
                customUserNamePasswordValidatorType= "NAThriveExtensions.Authentication, NAThriveExtensions" /&gt;
              &lt;/serviceCredentials&gt;
            &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
       &lt;/behaviors&gt;
       &lt;bindings&gt;
         &lt;basicHttpBinding&gt;
           &lt;binding name="basicHttpBinding_Secure"&gt;
             &lt;security mode="TransportWithMessageCredential"&gt;
               &lt;message clientCredentialType="UserName"/&gt;
             &lt;/security&gt;
           &lt;/binding&gt;
         &lt;/basicHttpBinding&gt;
       &lt;/bindings&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>