Uploading files larger than 4Mb




I've an ASP.NET Web application that has one form where the user can upload
a file to be sent and saved on a database. The app sends the file via DIME
attachments and SOAP envelopes to a Web Service that reads that package and
records the file on a specific record in a database.

It all goes well when my files are smaller than 4Mb.
Files larger than that origins a error message of "File extends size limits"
or something like that

I know that .NET has file size limitations and search on you web page for the
solution that arrives in the form of a code to add to my app web config....
the code is the following


Doing this on just my ASP.NET Web app the result is the same error...
But if I include it on my Web Service's Web.Config file it sents back a
different error: something like "HTTP 400... Bad request"
When doing debug i noticed that execution never enters my web service in the
method called... it allways sents the error first.

Can you assist me here?!?!
How can I force my web service to receive files larger that 4Mb

best regards
Jorge Ribeiro

Gopal \(FMS, Inc.\)

During upload or download, depending on the configuration of the computer,
the IIS Process may process the data, or the data may be buffered in memory.
When the file is large, the data is buffered in memory during communication
between these two processes. This may cause an increase in the memory
utilization on the web server and affect the performance and may even crash.

You can use streaming to workaround this problem. You can design a class
(that implement the IHttpHandler Interface) that Streams a file uploaded in
an HttpContext.Request to disk, without first buffering the entire file to
web server memory.

If you do not want to implement the class yourself, the FMS Total .NET
Sourcebook has code to do this, and much, much,
more. Please visit: http://www.fmsinc.com/dotnet/SourceBook/

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Latest member

Latest Threads