Solved

FileUpload Control

Posted on 2011-03-10
13
631 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

15 Experts available now in Live!

Get 1:1 Help Now