2012-08-22 28 views
0

我想使用C#程序將文件上傳到SharePoint文件庫。 我已經使用web服務Copy的API CopyIntoItems來執行文件上傳。 爲此所提供的憑證是默認憑證。 當使用winform應用程序(用戶具有對文檔庫的寫入訪問權限)進行測試時,該功能會成功並將文檔上載到文檔庫。將文件上傳到共享點時訪問被拒絕錯誤

但是,當它從其他應用程序遠程調用時,它會發生訪問被拒絕錯誤。

有什麼可以解決這個問題?

請參閱代碼片段。

  Copy copyService = new Copy(); 
    copyService.Url = mySiteUrl + "/_vti_bin/copy.asmx"; 
      copyService.PreAuthenticate = true; 
      copyService.Credentials = CredentialCache.DefaultCredentials; 
      copyService.UseDefaultCredentials = true; 


     ........................................ 
     ................................... 
      copyService.CopyIntoItems(destination, destinationUrl, filedInfo, bteFileContents, out cResultArray); 

回答

1

什麼是您的Web應用程序(不是Sharepoint,但調用SharePoint服務)的身份驗證配置?

如果啓用委派的不是Kerberos,則可能面臨「double hop」問題。

相關問題