Solved

FileUpload Control

Posted on 2011-03-10
13
630 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
  • 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
 

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now