2011-10-09 181 views
5

我正試圖從我們的辦公室SharePoint中調用Web服務。它工作時,我從我們的測試項目中調用它,我可以通過瀏覽器訪問url和檢索信息,但是當我通過web服務調用它時,出現以下錯誤:HTTP請求未經客戶端身份驗證方案「協商」授權。身份驗證標頭

System.ServiceModel.Security.MessageSecurityException:HTTP請求未經授權客戶認證方案'談判'。從服務器收到的驗證頭是'基本領域=

當我們登錄到SharePoint時,我們使用我們的Windows憑據自動登錄。

我的web配置是這樣的範圍內:

<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。

感謝您的幫助

Ë

+0

我猜測Sharepoint傳遞Sharepoint應用程序在SharePoint服務器上運行的憑據,而不是登錄的用戶。您是否可以在事件查看器中看到錯誤?這可能有錯誤「用戶」沒有權限...「 – Brady

回答

4

你的客戶端和服務器使用不同的身份驗證方案。服務器使用「基本身份驗證」,而您的客戶端使用「協商」,我猜是Windows身份驗證。

相關問題