I'm trying to call a webservice from our office sharepoint. It works when I call it from our testing project and I can access the url and retrieve information through the browser but when I call it through a webservice I get the following error:
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Basic realm=
When we log into sharepoint we use our windows credentials to login automatically.
My web config looks like this within :
<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>
The url uses SSL (i.e. https://blahblah.com.sharepoint.emea.microsoftonline.com/Lists/....)
I've used almost every combination there is: transport with ntlm, TransportWithMessageCredential with basic etc and I either get the error message that it's expecting http and it get's https.
Thanks for the help
E
Your client and server is using different authentication scheme. The server uses 'Basic Authentication' while your client uses 'Negotiate' which I guess is Windows Authentication.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With