IIS 7 httpruntime maxRequestLength limit of 209715

2019-02-09 23:10发布

问题:

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.

回答1:

The maxRequestLength is measured in kilobytes, so you already set it to be 2GB (2097151 / 1024 / 1024 = 2).



回答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