title: User authentication based on basicHttpBinding without certificate
body: <p>I am trying to set up a web service which is to have a username and password in order to access the service. I am using this link as a guide <a href="http://www.codeproject.com/Articles/642997/Generate-username-authentication-based-on-basicHtt" rel="nofollow">http://www.codeproject.com/Articles/642997/Generate-username-authentication-based-on-basicHtt</a></p>
  
  <p>I've hit an area where i cant get around the below error. With my config below i received this error message</p>
  
  <blockquote>
    <p>The authentication schemes configured on the host ('Anonymous') do not allow those configured on the binding 'BasicHttpBinding' ('Basic').  Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly.  Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the  element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement.</p>
  </blockquote>
  
  <p>My config file is</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
  &lt;system.serviceModel&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="customBehavior"&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
        &lt;serviceCredentials&gt;
          &lt;userNameAuthentication
            userNamePasswordValidationMode="Custom"
            customUserNamePasswordValidatorType="Project.Services.MyService, Project.Services"/&gt;
        &lt;/serviceCredentials&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="MyBasicHttpBinding"&gt;
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="Basic" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;services&gt;
    &lt;service behaviorConfiguration="customBehavior" name="Project.Services.MyService"&gt;
      &lt;endpoint address=""
        binding="basicHttpBinding" bindingConfiguration="MyBasicHttpBinding"
        contract="Project.Services.Interfaces.ITechnology"&gt;
        &lt;identity&gt;
          &lt;dns value="localhost" /&gt;
        &lt;/identity&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
      &lt;host&gt;
        &lt;baseAddresses&gt;
          &lt;add baseAddress="http://localhost/Service/myService.svc" /&gt;
        &lt;/baseAddresses&gt;
      &lt;/host&gt;
    &lt;/service&gt;
  &lt;/services&gt;
    &lt;/system.serviceModel&gt;
    &lt;appSettings&gt;
      &lt;add key="userName" value="user1"/&gt;
      &lt;add key="password" value="password"/&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The wcf service is to be used with a Windows Phone 8 application. I've read several articles on the error and have set the endpoint address to "" but nothing i've done is working. I've had to go back to the above config as i think i was making too many changes which might just put me on the wrong track.</p>
  
  <p>The service is hosted on my Local IIS (Win 8 64 bit pro + all updates).</p>
  
  <p>Could anyone assist?</p>