我试图从我们的办公Sharepoint调用一个web服务。当我从我们的测试项目中调用它时,它可以工作,我可以通过浏览器访问URL并检索信息,但是当我通过web服务来调用它时,我会收到以下错误:
System.ServiceModel.Security.MessageSecurityException:HTTP请求未经授权,客户端认证方案为“Negotiate”。从服务器接收到的验证标头为“Basic realm = 当我们登录Sharepoint时,我们使用我们的Windows凭据自动登录。
我的Web.config如下所示:
System.ServiceModel.Security.MessageSecurityException:HTTP请求未经授权,客户端认证方案为“Negotiate”。从服务器接收到的验证标头为“Basic realm = 当我们登录Sharepoint时,我们使用我们的Windows凭据自动登录。
我的Web.config如下所示:
<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传输、使用basic的TransportWithMessageCredential等,但我仍然收到错误消息,提示它期望http而实际却是https。
感谢您的帮助。
E