ASP.NET File Upload Size Limit?

Posted on 2007-07-31
Last Modified: 2010-08-05
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?
Question by:SkipFire
    LVL 29

    Expert Comment

    by:Gautham Janardhan
    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
    LVL 29

    Accepted Solution

    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...
    LVL 25

    Expert Comment

    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 for more information.

    LVL 4

    Author Comment

    Thanks, I only used maxRequestLength but it worked great.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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

    Suggested Solutions

    Title # Comments Views Activity
    Help needed on website authentication 7 37
    Path of Workbook 3 30
    Response back from stored procedure 6 32
    popup message 3 17
    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 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

    7 Experts available now in Live!

    Get 1:1 Help Now