problem in large file upload RRS feed

  • Question

  • User180529767 posted


    I have a sharepoint 2007 app on IIS 6.0 windows server 2003 , and I want to upload files with it using webservice.the app upload file on session and after clicking on sendbtn it send created datatabe to webservice.

    I checked my app with a file with size 9MB and it worked fine, but when I want to upload a 40MB file it returns an error when send file on sendbtn_click

    Exception of type 'System.OutOfMemoryException' was thrown. 


    I've set both my sharepoint web confing , so I can upload files on session with no error:

    <httpRuntime executionTimeout="30000" maxRequestLength="2000000" />

    I did that setting on my webservice too but  its not working.

    this app works on my test server very well , but  on the customers server its not working.

    I also changed the AspMaxRequestEntityAllowed on  Metabase.XML to


    I also changed     AspBufferingLimit="41943040" 

    and I restarted my iis several times but the problem still exists:(

    please help me



    I should add that my webservice will upload files on sqlserver 2008 R2





    Monday, April 23, 2012 2:52 AM

All replies

  • User-1499466209 posted


    check your application pool properties : do you have memory limits defined?

    Or maybe it could be in the machine.config; there is a memorylimit attribute too.

    Monday, April 23, 2012 4:42 AM
  • User1073881637 posted

    Here looks like a workaround someone posted.


    Monday, April 23, 2012 4:45 AM
  • User180529767 posted

     Hi fab,

    thanks for response. I've checked my application pool:

    maximum used memory (megabyte) is set to 1000

    and maximum virtual memory (megabyte) is set to 1700

    is there any thing that can cause a problem?

    Monday, April 23, 2012 4:52 AM
  • User180529767 posted

     Hi Steve,

    Thanks for response,  I've just read the article, but the problem is not like mine.

    I'm not using sharepoint lists and I'm not running crowl, also I've restarted my iis several times and nothing changed.

    Monday, April 23, 2012 5:04 AM
  • User180529767 posted

     I wondered! I've just checked the machine.config file, it has no memoryLimit on it. microsoft said that the default value is "60"(percent), So I've added memoryLimit="60" to the machine.config and restarted the IIS, and it worked!!!! now I can upload a file up to 100MB but when I tried to upload a file with 109MB it returned the error below:

     The underlying connection was closed: An unexpected error occurred on a send

    any Idea?

    Monday, April 23, 2012 8:35 AM
  • User1073881637 posted
    What is the status code in the IISLogs?  What is the upload limit on your web app?
    Monday, April 23, 2012 8:38 PM
  • User180529767 posted

     Dear Steve,

    Thanks alot for responce.I have no upload limit in my code, also I've set the web config of my web service to accept request with 2GB in it's web config...

    <httpRuntime executionTimeout="30000" maxRequestLength="2000000" /> 

    is there any other setting in my app that can probably limit my upload size?

    and I'm seeking for my IISLog and I will update ASAP...

    Tuesday, April 24, 2012 2:51 AM
  • User180529767 posted

     Dear Steve,

    I cant find the status code... can you help me?

    Also I've find out that the problem is between my Presentation app and the webservice... because the webservice didn't raise any exeption...

    Tuesday, April 24, 2012 3:30 AM
  • User1773224436 posted


    cant find the status code... can you help me?

    To find the status code from your log file.

    Also I've find out that the problem is between my Presentation app and the webservice


    You mean the problem occurs when your Presentation appliction calls the webservice?

    Wednesday, April 25, 2012 5:24 AM
  • User180529767 posted


    Yes, I happens when UI calls the WebService.

    and also it is ok when the file is 99MB... so i think the 100MB is the threshold for microsoft IIS.

    Wednesday, May 9, 2012 1:59 AM
  • User46096340 posted

    I am not able to upload any file more tha n20 MB, how could you upload 99 MB, I am also calling the webservice for this, I tried the option to increate the memory in process model. can you help me on this.

    Tuesday, April 11, 2017 5:18 PM