The authentication schemes configured on the host ('Anonymous') do not allow those configured on the binding 'BasicHttpBinding' ('Negotiate').
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.
Solution 3
If necessary - install features as described above, open IIS Manager, open the server features:
open the feature "Authentication":
enable/disable needed ones:
Solution 4
I solved this issue adding Negotiate to IIS Authentication Providers:
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.
Related videos on Youtube
Harsha
Updated on April 27, 2020Comments
-
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 over 5 yearsI 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 over 4 yearsNote - 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 over 4 yearsDo confirm the field in csproj cause I found the value somehow doesn't match what I saw in VS2017.
-
ecif about 4 yearsExactly what I was looking for. Thanks!