Checking file upload size

Discussion in 'ASP .Net' started by Vicky, Feb 11, 2004.

  1. Vicky

    Vicky Guest

    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
     
    Vicky, Feb 11, 2004
    #1
    1. Advertising

  2. 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
     
    =?Utf-8?B?QXZuZWVzaA==?=, Feb 11, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lawrence

    Upload file Check file size

    lawrence, Jun 10, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    9,308
    Craig Deelsnyder
    Jun 10, 2004
  2. Robert Strickland

    File Upload and File Size Limitations

    Robert Strickland, Oct 29, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,700
    Lau Lei Cheong
    Nov 1, 2004
  3. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,542
    Bruce Barker
    Aug 3, 2005
  4. Mel
    Replies:
    4
    Views:
    499
    Jan Faerber
    Nov 23, 2004
  5. DJ Stunks
    Replies:
    1
    Views:
    191
    J. Gleixner
    Jan 23, 2006
Loading...

Share This Page