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

66,239

Solution 1

This error may be shown when you don't have authentication modes installed in your local IIS Webserver. Go to Control Panel -> Programs -> Turn Windows features on or Off

Check Internet Information services -> Wold wide web Services -> Security -> and enable Basic, Windows, Digest Authentication modes. Open IIS and navigate to your application and go to the authentication section and Enable the required authentication modes. For me the authentication modes didn't show up immediately after the installation or after webserver restart. Doing a machine reboot showed them in the webapplication.

Solution 2

If you face this problem while debugging in Visual Studio, select your project and change authentication in properties.

VS win auth

Solution 3

If necessary - install features as described above, open IIS Manager, open the server features:

enter image description here

open the feature "Authentication":

enter image description here

enable/disable needed ones:

enter image description here

Solution 4

I solved this issue adding Negotiate to IIS Authentication Providers: enter image description here

Solution 5

This was occurring for me as the site had WCF configured for Windows Authentication...

<security mode="Transport">
    <transport clientCredentialType="Windows" />
</security>

However IIS had Windows Authentication Disabled and Anonymous Authentication Enabled. The fix was to Enable Windows Authentication in IIS.

Share:
66,239

Related videos on Youtube

Harsha
Author by

Harsha

Updated on April 27, 2020

Comments

  • Harsha
    Harsha about 4 years

    The authentication schemes configured on the host ('Anonymous') do not allow those configured on the binding 'BasicHttpBinding' ('Negotiate'). 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.

  • Chanicho
    Chanicho over 5 years
    I was having a similar problem using IIS Express for debugging my project. Enabling Anonymous Authentication via the properties window fixes the problem for IIS Express users.
  • Naren
    Naren over 4 years
    Note - just enabling the Windows Authentication alone under the Windows Features on or off > IIS doesn't work. You'll need to enable Basic, Digest & Windows Auth.
  • Circle Hsiao
    Circle Hsiao over 4 years
    Do confirm the field in csproj cause I found the value somehow doesn't match what I saw in VS2017.
  • ecif
    ecif about 4 years
    Exactly what I was looking for. Thanks!