title: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM’
body: <p>I have an ASP.NET web application written in VB.NET. One part of the application makes an AJAX call to an internal ASMX file which in turn makes a call to a remote web service which is just a single ASMX file. Normally this works fine and has been deployed a couple of times and works fine. One client however, is getting the message from the AJAX call: </p>
  
  <blockquote>
    <p>The HTTP request is unauthorized with client authentication scheme
    'Anonymous'. The authentication header received from the server was
    'NTLM’.</p>
  </blockquote>
  
  <p>I have scoured a large amount of websites trying to fix this but I can’t seem to find any answer that works for me.</p>
  
  <p>I have been unable to replicate the error on my test server, which is the same as the client, Win2003 IIS6.</p>
  
  <p>The remote web service is deployed on Windows 2008 r2 – IIS7.5. The remote service is deployed using ‘Anonymous’ authentication only. The client deployment is set up with Anonymous and ‘Integrated Windows Authentication’. I have tried changing the authentication levels on both implementations but cannot replicate the issue. The closest I have come is when I set the remote service IIS authentication to </p>
  
  <blockquote>
    <p>The HTTP request is unauthorized with client authentication scheme
    'Ntlm'. The authentication header received from the server was ''.</p>
  </blockquote>
  
  <p>In the web.config file the reference to the remote service is:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;basicHttpBinding&gt;
              &lt;binding name="SVCMappingSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/&gt;
                  &lt;security mode="None"&gt;
                      &lt;transport clientCredentialType="None" proxyCredentialType="None" realm=""/&gt;
                      &lt;message clientCredentialType="UserName" algorithmSuite="Default"/&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://svc.website.com/services/myService.asmx" binding="basicHttpBinding" bindingConfiguration="SVCMappingSoap" contract="SVCMappingService.SVCMappingSoap" name="SVCMappingSoap"/&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>I have tried changing a number of the setting in the <code>&lt;security&gt;</code> section but still unable to replicate.</p>