?
Solved

FileUpload Control

Posted on 2011-03-10
13
Medium Priority
?
638 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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

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 2000 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 Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

801 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