Click here to Skip to main content
15,867,686 members
Articles / Web Development / ASP.NET
Tip/Trick

How to increase the upload file length limit in ASP.NET

Rate me:
Please Sign up or sign in to vote.
3.40/5 (5 votes)
20 Feb 2011CPOL 35.5K   7   4
How to increase the upload file length limit in ASP.NET
Generally, the uploading limit of ASP.NET FileUploader is 4MB. But you can increase the limit of length of uploaded file by using the following code into your web.config file in your website.
XML
<httpruntime maxrequestlength="20480" executiontimeout="600">
</httpruntime>

You have to add this tag after the system.web of your web.config file...
If you want to increase the upload limit more than 20MB, then you have to change both the value of maxRequestLength in KB and also executionTimeout.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Bangladesh Bangladesh
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
SuggestionRead MSDN Documentation Pin
Willian Arsenio30-Jul-13 2:43
Willian Arsenio30-Jul-13 2:43 
GeneralReason for my vote of 4 good tip Pin
JESUSNAUN201022-Feb-11 3:06
JESUSNAUN201022-Feb-11 3:06 
GeneralReason for my vote of 3 I thing that very helper, to us Deve... Pin
ARIBERTO22-Feb-11 1:39
professionalARIBERTO22-Feb-11 1:39 
GeneralReason for my vote of 1 Not very good. Pin
Moeez Ahmed21-Feb-11 22:25
Moeez Ahmed21-Feb-11 22:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.