[英]The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM'
[英]The HTTP request is unauthorized with client authentication scheme 'Negotiate'. the authentication header
我正在尝试从我们的办公室sharepoint调用web服务。 当我从我们的测试项目中调用它时,它可以工作,我可以访问URL并通过浏览器检索信息,但是当我通过webservice调用它时,我收到以下错误:
System.ServiceModel.Security.MessageSecurityException:HTTP请求未经授权,客户端身份验证方案为“Negotiate”。 从服务器收到的身份验证标头是'Basic realm =
当我们登录sharepoint时,我们使用Windows凭据自动登录。
我的网络配置如下所示:
<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>
网址使用SSL(即https://blahblah.com.sharepoint.emea.microsoftonline.com/Lists/ ....)
我已经使用了几乎所有的组合:使用ntlm进行传输,使用基本等进行TransportWithMessageCredential运行,并且我得到的错误信息是它期望http并且它获得了https。
谢谢您的帮助
Ë
您的客户端和服务器使用不同的身份验证方案 服务器使用“基本身份验证”,而您的客户端使用“Negotiate”,我猜是Windows身份验证。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.