0
votes

I've got a WCF service with this configuration:

<system.serviceModel>
  <behaviors>
    <serviceBehaviors>
      <behavior name="">
        <serviceMetadata httpGetEnabled="true"/>
        <serviceDebug includeExceptionDetailInFaults="false"/>
      </behavior>
    </serviceBehaviors>
  </behaviors>
  <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>

It used to work with no problems but something must have changed because when I try to run it now I get this error:

The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'BasicHttpBinding' ('Anonymous').

I've tried deleting the IIS Express configuration files in the hope that it would reset itself to its default configuration (which I would assume includes Anonymous Authentication) but I still get the same error.

Is the error somewhere else, do I need to explicitly reconfigure IIS Express, or am I missing something else completely?

1

1 Answers

2
votes

I managed to solve it. Even though I reset the IIS Express configuration, for some reason it still disabled Anonymous Authentication on this application. Once I scrolled down to the bottom of the configuration file I found the following entry:

<location path="MyApplication">
    <system.webServer>
        <security>
            <authentication>
                <anonymousAuthentication enabled="false" />
                <windowsAuthentication enabled="true" />
            </authentication>
        </security>
    </system.webServer>
</location>

I enabled Anonymous Authentication the application worked.