SharePoint:将文件从 Silverlight 添加到 SharePoint 库时出现 401 身份验证错误 [英] SharePoint: 401 Auth error while adding file to SharePoint library from Silverlight
问题描述
我正在尝试从 Silverlight 应用程序将 XML 文件添加到 SharePoint 2010 站点中的库.我正在按照 https://sharepoint.stackexchange.com/questions/1837/how-can-i-upload-a-file-to-a-sharepoint-document-library-using-silverlight-and-cl 和 http:///social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/f135aaa2-3345-483f-ade4-e4fd597d50d4 和 如何使用 Silverlight 和客户端 Web 服务将文件上传到 Sharepoint 文档库?一>.
I am trying to add a XML file to a library in SharePoint 2010 site from a silverlight application. I am following the steps as in https://sharepoint.stackexchange.com/questions/1837/how-can-i-upload-a-file-to-a-sharepoint-document-library-using-silverlight-and-cl and http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/f135aaa2-3345-483f-ade4-e4fd597d50d4 and How can I upload a file to a Sharepoint Document Library using Silverlight and client web-services?.
但是我遇到了身份验证错误.
But I am getting an Auth error.
对 Silverlight 视图 (MVC) 进行一些更改时,数据库中的数据会更新.我在 Silverlight Web 应用程序上触发了一个服务 (basicHTTP),以从数据库中获取数据并编写一个 XML 文件.写入文件后,我尝试使用 SharePoint 的复制网络服务将文件上传到 SharePoint 库.
On some changes to a silverlight view (MVC), the data is updated in the database. I trigger a service (basicHTTP) on the silverlight web app to get the data from the database and write an XML file. Once the file is written, I try to upload the file to the SharePoint library using the SharePoint's Copy webservice.
有什么线索吗?
我尝试将上传文件的代码放在 Silverlight 服务器的不同服务中.但是,我不能使用 WSHttp 绑定,因为 Silverlight 不支持它.我正在使用 basicHttp 绑定.如何发送 Windows 用户凭据?
I tried putting the code for uploading the file in a different service in the silverlight server. But, I cannot use WSHttp binding as Silverlight doesnot support it. I am using basicHttp binding. How can I send the windows user credentials?
推荐答案
我的 clientconfig 中有这个:
I have this in my clientconfig:
<bindings>
<basicHttpBinding>
<binding name="CustomBinding" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly" />
</binding>
</basicHttpBinding>
</bindings>
这能让你更进一步吗?
这篇关于SharePoint:将文件从 Silverlight 添加到 SharePoint 库时出现 401 身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!