Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将文件上载到sharepoint时出现拒绝访问错误_C#_Sharepoint_Authentication_File Upload - Fatal编程技术网

C# 将文件上载到sharepoint时出现拒绝访问错误

C# 将文件上载到sharepoint时出现拒绝访问错误,c#,sharepoint,authentication,file-upload,C#,Sharepoint,Authentication,File Upload,我想使用C#程序将文件上载到sharepoint文档库。 我使用了webservice副本的API CopyIntoItems来进行文件上传。 为此提供的凭据是默认凭据。 当使用winform应用程序进行测试时,如果用户对文档库具有写访问权限,则测试成功,文档将上载到文档库 但当从其他应用程序远程调用该函数时,它会给出一个拒绝访问错误 解决这个问题的办法是什么 请参阅代码片段 Copy copyService = new Copy(); copyService.U

我想使用C#程序将文件上载到sharepoint文档库。 我使用了webservice副本的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);

您的web应用程序(不是Sharepoint,但调用Sharepoint服务的应用程序)的身份验证配置是什么

如果不是启用委派的kerberos,则可能会遇到“”问题