We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

The HTTP request is unauthorized with client authentication scheme 'Anonymous'RSS

3 replies

Last post Mar 19, 2021 06:15 PM by Plaban

  • The HTTP request is unauthorized with client authentication scheme 'Anonymous'

    Oct 17, 2018 03:06 AM|Shakhil Srivastava|LINK

    We have a set of VMs (windows server 2016) hosting IIS 10 with an Asp.Net based website. The website connects to a third party asmx based web service. Recently when connecting to the web service we have been receiving this error called

    "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'".

    The error is occurring very intermittently and sometimes it goes away automatically appearing the next day again. We tried switching off the auto recycling of the IIS Application pool, but that didn't help. What is more interesting is, we have other similar VMs for test environments with exactly the same configurations and settings, even hosting the same code which never encounters this error. The website uses Windows Authentication while the service is using Client Credentials (Username and password) to authenticate. IIS logs on the website shows status 200. Changing the config file may not be a solution as the same config file is working on other servers connecting to the same service. Anyone got any idea, please suggest.

    Thanks

    Shakhil Srivastava

  • Re: The HTTP request is unauthorized with client authentication scheme 'Anonymous'

    Oct 18, 2018 06:03 AM|Brando Zhang|LINK

    Hi Shakhil Srivastava,

    According to your description, I suggest you could try below solution.

    1.In regedit, locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
    2.Right-click MSV1_0, point to New, and then click Multi-String Value.
    3.In the Name column, type BackConnectionHostNames, and then press ENTER.
    4.Right-click BackConnectionHostNames, and then click Modify. In the Value data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click OK.

    Type each host name on a separate line.

    More details, you could refer to below article:

    https://blogs.msdn.microsoft.com/distributedservices/2009/11/10/wcf-calling-wcf-service-hosted-in-iis-on-the-same-machine-as-client-throws-authentication-error/ 

    Best Regards,

    Brando

  • Re: The HTTP request is unauthorized with client authentication scheme 'Anonymous'

    Oct 22, 2018 02:02 AM|Shakhil Srivastava|LINK

    Hi Brando,

    Many thanks for your time to look at this. I tried the solution in above thread, however, it worked for a day, and next day it fell over again as it has been doing for quite some time now after every solution we've applied.  In the step 4 above

    "4.Right-click BackConnectionHostNames, and then click Modify. In the Value data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click OK." - should we enter the computer name or the FQDN? For now, I just mentioned the server name on which the site is hosted. Is there something else we need to enter there?

  • Re: The HTTP request is unauthorized with client authentication scheme 'Anonymous'

    Mar 19, 2021 06:15 PM|Plaban|LINK

    Hi Shakhil,

    Did you find the exact issue and the resolution? We are also facing same intermittent issue.