Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1055
  • Last Modified:

ASP.NET File Upload Size Limit?

I have a project that imports a few CSV files from the user, and then runs them into a database.  The problem is there seems to be a size limit on the uploaded files and I cannot find how to remove or change that limit.  I have a 1.5MB file that works fine, but the 6MB and 7MB files do not work.  If I chop off the large files and get their sizes down they do work, of course then only part of the data is in the database.

Is there a real limit to the file size a browser can upload?  If so what is that limit?
  • 2
1 Solution
Gautham JanardhanCommented:
there is a size limit to the file size ..

u can change it application wise or server wise

application wise u nedd to chnage the web.config
Gautham JanardhanCommented:
Open your Web.config file, and just below the <system.web> tag, add the following tag:


just take a look at the maxRequestLength="4096" attribute of the <httpRuntime> tag. As you may have realized, all you need to do is change the value to some other value of your choice (8192 for 8 Mb, 16384 for 16 Mb, 65536 for 64 Mb, and so on...
Uploading 6MB and 7MB file if there are too many users might be a performance issue in future. SAFileUP control has an HTTP module for file upload that does not affect IIS performance while large files are being uploaded. Visit http://www.safileup.com/ for more information.

SkipFireAuthor Commented:
Thanks, I only used maxRequestLength but it worked great.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now