Click here to Skip to main content
Click here to Skip to main content

Setting maximum file uploading size

By , 21 Feb 2010
Rate this:
Please Sign up or sign in to vote.
We can set the maximum file upload size for the web application application. For that, we need to set following properties in the httpRuntime section, which is under <system.web>, which will be under <configuration> section.
maxRequestLength - This attribute is used to set is the maximum file upload size. We have to specify this size in kilobytes(default is 4096 KB i.e. 4 MB). We can set this to use it according to our requirements, we can increase for uploading large sized files or decrease it to restrict user to limited length.
ExecutionTimeout - This attribute is used to set maximum number of seconds that a request is allowed to execute before automatically shut down

<httpRuntime maxRequestLength="20480" executionTimeout="1500"/>


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

About the Author

Indrajeet Sutar
Software Developer (Junior) Excel Informatics, Pune
India India
Am Indrajeet T. Sutar. I am a web developer. I am working on .net technology. I have completed my Masters in Computers and Management (people call it as MCA, MBA etc.) Apart from programming i do photography (not regularly though), traveling and reading books.

Comments and Discussions

GeneralReason for my vote of 1 :( PinmemberMember 800727930-Oct-11 22:00 

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

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

| Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 21 Feb 2010
Article Copyright 2010 by Indrajeet Sutar
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid