SharePoint: 401 Auth error while adding file to SharePoint library from Silverlight

落花浮王杯 提交于 2019-12-12 02:42:12

问题


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.

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.

Any clue?

Edit:

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?


回答1:


I have this in my clientconfig:

   <bindings>
      <basicHttpBinding>
        <binding name="CustomBinding" maxBufferSize="2147483647"
            maxReceivedMessageSize="2147483647">
          <security mode="TransportCredentialOnly" />
        </binding>
      </basicHttpBinding>
    </bindings>

Does that get you any further?



来源:https://stackoverflow.com/questions/7766093/sharepoint-401-auth-error-while-adding-file-to-sharepoint-library-from-silverli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!