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

how to restrict size of file upload in asp.net

Rate me:
Please Sign up or sign in to vote.
4.76/5 (14 votes)
29 Jul 2011CPOL 40.2K   9   7
How to restrcit the size of file uploads in ASP.NET
how to restrict size of file upload in asp.net

XML
<system.web>
<httpRuntime executionTimeout="9999" maxRequestLength="2097151"/>
</system.web>

License

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


Written By
Web Developer Cholamandalam MS General Insurance
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 5 Pin
manoj.jsm13-Jun-13 20:46
manoj.jsm13-Jun-13 20:46 
General<system.web> <httpRuntime executionTimeout="9999" maxRequest... Pin
Ashika s3-Aug-11 1:22
Ashika s3-Aug-11 1:22 
<system.web>
<httpruntime executiontimeout="9999" maxrequestlength="2097151">

Generalhii, wre i gve this? <system.web> <httpRuntime executionTime... Pin
Ashika s3-Aug-11 1:22
Ashika s3-Aug-11 1:22 
GeneralRe: in the 'web.config' file Pin
Issac99910-Aug-11 1:46
Issac99910-Aug-11 1:46 
GeneralReason for my vote of 4 Pros: simple, global and gives admin... Pin
GATzilla28-Jul-11 19:10
GATzilla28-Jul-11 19:10 
GeneralRe: <i>what if you need different limits for different site area... Pin
Monjurul Habib29-Jul-11 5:20
professionalMonjurul Habib29-Jul-11 5:20 
GeneralReason for my vote of 5 nice for global restriction Pin
Monjurul Habib28-Jul-11 11:41
professionalMonjurul Habib28-Jul-11 11:41 

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.