Solved

FileUpload Control

Posted on 2011-03-10
13
634 Views
Last Modified: 2012-05-11
I need to upload large files (150 mb) in using the ASP fileupload control.  The site runs on the 2.0 framework.  I increased the defualt size from 4mb but I keep getting an out of memory exception error.
0
Comment
Question by:triplebd69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35095570
Can you check the memory limit on the application pool settings.

there might be a hard limit.

also check the application log for event .


Best of Luck.
0
 

Author Comment

by:triplebd69
ID: 35096161
Here the therror I get back I think it is in the webservice but not sure.  If so any ideas how to get past this?
System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at MEI.SPMEIUniversal_DocUpload.SPDocLibUpload2.UploadToDocumentLibrary(String spSiteUrl, String documentLibraryGuid, String fileName, XmlNode fieldNode, Byte[] fileBytes) in C:\mei\Class Library\MEI_SP_Documents\MEI_SP_Documents\MEI_SP_Documents\Web References\SPMEIUniversal_DocUpload\Reference.vb:line 122
   at MEI.SPDocuments.SP_Documents.Upload(IDocument doc) in C:\mei\Class Library\MEI_SP_Documents\MEI_SP_Documents\MEI_SP_Documents\SP_Documents.vb:line 372

Open in new window

0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35096243
That is very obvious the max request size , which in your case should be 120 + megs ( in bytes)

but honestly that is very large for a post to a web service .

I think you might have some design changes to make.



If you want to share your config file snippets , please inidicate which config file you are referring to.

Best of luck.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:triplebd69
ID: 35096394
Hers is the setting for the file size in my web.config.  I need to handle a file that is 150mb.
<system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="153600000"></requestLimits>
      </requestFiltering>
    </security>
	</system.webServer>

Open in new window

0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35096596
You need twice as much  of the file size .
307200000


<system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="307200000"></requestLimits>
      </requestFiltering>
    </security>
        </system.webServer>


Give it a shot
0
 

Author Comment

by:triplebd69
ID: 35096625
I don' understand, could you please explain why I need to double the size?
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35096715
because it is sent as a xml serialized file( no matter what is your file )

for example

myfile.txt

content
"Hello World"

<xml File > 
  <Name  = xyz.txt > </Name>
  <Content MIME 8 bit or other .. = d6f7dasf9das87f6dasuafagfdahgfyewiqurytqryewqryueqt7283946321948263149816423984761239486328 VERY LONG STRING > </Content>
</xml file>



similar to mail attachments if you will.

0
 

Author Comment

by:triplebd69
ID: 35096758
Is maxAllowedContentLength in bytes, or kb?  Still not sure I have a good understanding of why the size needs to double.
0
 

Author Comment

by:triplebd69
ID: 35096793
I tried upping maxAllowedContentLength="307200000" like you suggested and still get this error back.
System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

Open in new window

0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35096811
in Bytes
0
 
LVL 14

Accepted Solution

by:
GeorgeGergues earned 500 total points
ID: 35096851
Are you sure that is the correct web.config for the service. and it is not a part of an application ?

0
 

Author Comment

by:triplebd69
ID: 35096918
This is the web.config of the app not the webservice
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35096940
can you post a screen shot of the Application and virtual folders  
also the URL of the web service in relation to the application .


An easier way is to search the folder for all web.config files and see if you have more than one.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question