I have a WebHttpBinding service which uses basic HTTP authentication mode, however for some strange reason it validates provided username/password against windows accounts, thought i specified userNamePasswordValidationMode="MembershipProvider".
I found other posts that report this problem too, but no answer to this situation have been given.
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="WebBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="EPWeb">
<webHttp helpEnabled="true" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="SqlProvider" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ServiceBehavior" name="Foo">
<endpoint address="Test" behaviorConfiguration="EPWeb"
binding="webHttpBinding" bindingConfiguration="WebBinding"
contract="Foo.IService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:3456/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
This configuration will not work. But there are workarounds to this issue: