An HTTP request is not authorized using the Negotiate client authentication scheme. authentication header

I am trying to call webservice from our sharepoint. It works when I call it from our test project, and I can access the URL and get information through the browser, but when I call it through the web service, I get the following error:

System.ServiceModel.Security.MessageSecurityException: An HTTP request was not authorized using the Negotiate client authentication scheme. The authentication header received from the server was "Basic realm =

When logging into sharepoint, we use the Windows credentials to log in automatically.

My web configuration looks like this:

<binding name="ListsSoap" 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">

  <readerQuotas maxDepth="32" maxStringContentLength="8192"
     maxArrayLength="16384"
                       maxBytesPerRead="4096"
    maxNameTableCharCount="16384" />
  <security mode="Transport">
    <transport clientCredentialType="Windows" proxyCredentialType="Basic" realm="" />
    <message
    clientCredentialType="UserName" algorithmSuite="Default" />
  </security>
</binding>

URL SSL (.. https://blahblah.com.sharepoint.emea.microsoftonline.com/Lists/....)

: ntlm, TransportWithMessageCredential .., , http, https.

+5
1

. "Basic Authentication", "Negotiate", , , Windows.

+4

All Articles