使用CSOM在sharepoint 2013 onprime中上传大文件的问题 [英] issue with large file upload in sharepoint 2013 onprime using CSOM

查看:80
本文介绍了使用CSOM在sharepoint 2013 onprime中上传大文件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用客户端代码将大文件上传到on-prime SharePoint 2013库。


while上传> = 500MB文件我收到超时错误。


我将Central Admin的最大上传大小扩展到1 GB。


IIS中的扩展超时3600秒(1小时)


在web.config中更新 




代码:


            using(FileStream fsOP = new FileStream(filePath,FileMode.Open))

            {

                FileCreationInformation fcFile = new FileCreationInformation();



                    fcFile  .ContentStream = fsOP;

                fcFile.Url = System.IO.Path.GetFileName(filePath);

                fcFile.Overwrite = true;



               列出docs = web.Lists.GetByTitle(libraryName);

                Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(fcFile);

                

                ctx.Load(uploadFile);

                ctx.ExecuteQuery();

            }


web.config:


< httpRuntime executionTimeout =" 6000"的maxRequestLength = QUOT; 2097151"&NBSP; requestValidationMode = QUOT; 2.0" />



我仍然收到错误。


实际要求应该能够上传1.5 GB。



请帮助我。

解决方案

您好


您不仅应该更改IIS wwwroot文件夹中的webconfig文件。


但也是SharePoint安装文件夹的webconfig,就像布局中的webconfig一样。我目前没有环境,也无法清楚地记住这些配置文件的位置。


这是一个完整的介绍。


https://social.technet.microsoft.com/wiki /contents/articles/20299.sharepoint-2010-uploading-large-files-to-sharepoint.aspx


Hi,

I am using client side code to upload the large file to on-prime SharePoint 2013 library.

while uploading >=500MB file I got timeout error.

I did extended Maximum Upload Size in Central Admin upto 1 GB.

Extended timeout in IIS 3600 sec. (1 hr)

updated in web.config 

code:

            using (FileStream fsOP = new FileStream(filePath, FileMode.Open))
            {
                FileCreationInformation fcFile = new FileCreationInformation();

                   fcFile .ContentStream = fsOP;
                fcFile.Url = System.IO.Path.GetFileName(filePath);
                fcFile.Overwrite = true;

                List docs = web.Lists.GetByTitle(libraryName);
                Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(fcFile);
                
                ctx.Load(uploadFile);
                ctx.ExecuteQuery();
            }

web.config:

<httpRuntime executionTimeout="6000" maxRequestLength="2097151"  requestValidationMode="2.0" />

still I am getting error.

the actual requirement is should able to upload 1.5 GB.

Please assist me.

解决方案

Hi

You should not only change the webconfig file in IIS wwwroot folder.

But also the SharePoint installation folder's webconfig, like webconfig in layouts. I don't have environment currently and cannot remember clearly where those config files are.

Here is a complete introduction.

https://social.technet.microsoft.com/wiki/contents/articles/20299.sharepoint-2010-uploading-large-files-to-sharepoint.aspx


这篇关于使用CSOM在sharepoint 2013 onprime中上传大文件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆