Checking file upload size

V

Vicky

i have specified 10000 kbytes iin maxrequestlength , now if a file having
size more than the limit is selected and upload button is pressed then page
not found error comes.
How to check file size and restrict user before this error occurs

Vicky
 
G

Guest

By default ASP.NET has a limits of file upload size equals to 4Mb approx.
This is implemented to prevent denial of service attacks ( smebody try to bring down the server by uploading massive files).

To enable support for larger files, you should add following configuration setting value to your application ( machine's web.config file):

<configuration><system.web><httpRuntime maxRequestLength="4096" /></system.web></configuration>

Replace 4096 with higher value.

Hope this helps.

Avneesh
MCAD, MCSD.Net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top