title: The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'
body: <p>I am trying to program a VisualWebPart using Visual Studio 2010 which has to do a simple thing: invoke a web service (hosted in a remote server, NOT locally). When I execute within the Sharepoint site (version 2010, which I have published in my IIS) I get this error:</p>
  
  <p>"The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'."</p>
  
  <p>Pardon my ignorance, but the only difference here is the case of the Ntlm authentication scheme! I have been all over the web and found many related problems, but none of the solutions worked. <strong>Almost ALL solutions i found involve modifications in the webservice security configuration, this is not an option for me.</strong></p>
  
  <p>Looking for a solution, I created a sample windows form and invoked the web service from it: no problems whatsoever.</p>
  
  <p>In order to be able to invoke the webservice correctly this is the necessary security configuration:</p>
  
  <pre><code>&lt;security mode="TransportCredentialOnly"&gt;
     &lt;transport clientCredentialType="Ntlm" proxyCredentialType="Ntlm" realm="" /&gt;
     &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
  &lt;/security&gt;
  </code></pre>
  
  <p>I believe the problem is that I haven´t been able to properly set this security property to the web.config of my Sharepoint site, since I tried to put it in the security tag that appears in the web.config but still get the same error. </p>
  
  <p>Any further information needed please ask, I am REALLY desperate, for days I have been with the SAME error.</p>