I am attempting to upload files to my Sharepoint 2010 server running on IIS 7 via the sharepoint client object model. The issue I have found is the file size limit is very well...limiting. I have read quite a few posts on the subject and it seems as though I'm running into an issue that is separate from those that I have found posted previously. After some experimentation and trying different methods I have finally found that the limit I am hitting right now is due to the following config setting in my web.config:
<system.web>
<httpRuntime maxRequestLength="2097151" />
</system.web>
Originally it was set at 51000 or so. I tried to put the 2 gig value that I have seen listed elsewhere at the theoretical maximum in for the value but when this is done the site won't load and the returned error states that the valid range for this setting is 0-2097151. I am wondering if there is somewhere else that this maximum allowed range is being set? It seems strange that it is so low, this basically limits any file upload I could provide to being only 2 megs which is smaller than the Sharepoint configurations upload limit of 50 megs.
HttpRuntime maxRequestLength Use the maxRequestLength of the httpRuntime element. The default size is 4096 kilobytes (4 MB). Max value 2,147,483,647 kilobytes (~82 Terabyte).
The MaxRequestLength property specifies the limit for the buffering threshold of the input stream. For example, this limit can be used to prevent denial of service attacks that are caused by users who post large files to the server.
The maxRequestLength is measured in kilobytes, so you already set it to be 2GB (2097151 / 1024 / 1024 = 2).
I have the same problem, but I found that you have to put
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
too here for some IIS up http://ajaxuploader.com/large-file-upload-iis-asp-net.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With