Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

by victor 7. May 2012 08:24

You might get a "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service." exception when configuring security for WCF services. In order to fix this change your web config to this:

<configuration>
  ...
  <system.serviceModel>
    ...
    <bindings>
      <basicHttpBinding>
        <binding>
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    ...
  </system.serviceModel>
  ...
</configuration>

Tags: