简体   繁体   中英

Bypass 2GB Upload Limit IIS

IIS (7) is blocking my upload from client (asp.net code - .NET 3.5) to my server (sharepoint) because the file is larger than 2GB. From my research on the web, that appears to be the limit.

So how can we bypass this limit?

Client code :

string urlFile = "xxxxx"

Stream input = Telechargeur.FileContent
Stream output = new FileStream(urlFile,FileMode.OpenOrCreate)

byte[] buffer = new byte[1024*1024*5]
int nbRead = -1

while((nbRead = input.Read(buffer,0,buffer.Length))>0)
{
  output.Write(buffer,0,nbRead);
  output.Flush();

}

input.Close();
output.Close();

Server code :

string urlFile = "xxx"

Stream input = context.Request.InputStream; Stream output =  new FileStream(urlFile,FileMode.OpenOrCreate)

byte[] buffer = new byte[1024*1024*5]
    int nbRead = -1

    while((nbRead = input.Read(buffer,0,buffer.Length))>0)
    {
      output.Write(buffer,0,nbRead);
      output.Flush();

    }

    input.Close();
    output.Close();

Thanks a lot

Since you didn't say what version of SharePoint you are using I'll assume 2013. See the Technet article on Software boundaries and limits for SharePoint 2013 This is an architectural limit in the design of SharePoint, it cannot be bypassed. What you are trying to subvert here is actually THE scenario used in the article to define what a "boundary" is:

Boundaries are absolute limits that cannot be exceeded by design. It is
important to understand these limits to ensure that you do not make 
incorrect assumptions when you design your farm.

An example of a boundary is the 2 GB document size limit; you cannot 
configure SharePoint Server 2013 to store documents that are larger than 2 
GB. This is a built-in absolute value, and cannot be exceeded by design.  

Even if you could convince SharePoint to let you bypass the limit, that is an extremely bad idea because it would leave your farm in an unsupported state. That means that when you call in for support with some weird problem and what you have done is discovered, you will be told that you will not get support on that farm until you rebuild it correctly.

It also occurred to me that RBS might let you bypass this limit. Sorry, that wont do it either:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM