The size FileUpload can access?

Discussion in 'ASP .Net' started by ad, Jan 20, 2006.

  1. ad

    ad Guest

    I use a FileUpload control to upload a text file to web server.
    If the size of the file is larger (about 9M), the page will result in an
    "Can't find page" error after I press a button to access the file.
    But if the size of the file is small, it will be ok.
    Is there a limitation of FileUpload control?
     
    ad, Jan 20, 2006
    #1
    1. Advertising

  2. ad

    Joey Guest

    Look into httpMaxRequestLength in the web.config file. You have to set
    this to get around the default value (that is 4MB, I think).

    Also, even when you do this you will be limited by the memory space on
    your PC, because the HttpFileUpload control copies the ENTIRE file to
    memory when uploading.

    We have seen about 700MB max filesize with this control, even after
    adjusting the config file from 60% to 80% on a dedicated web server.
     
    Joey, Jan 20, 2006
    #2
    1. Advertising

  3. ad

    ad Guest

    Thanks,
    But I can't find MaxRequestLength in my Web.Config.
    Which section which I will insert?


    "Joey" <>
    ???????:...
    > Look into httpMaxRequestLength in the web.config file. You have to set
    > this to get around the default value (that is 4MB, I think).
    >
    > Also, even when you do this you will be limited by the memory space on
    > your PC, because the HttpFileUpload control copies the ENTIRE file to
    > memory when uploading.
    >
    > We have seen about 700MB max filesize with this control, even after
    > adjusting the config file from 60% to 80% on a dedicated web server.
    >
     
    ad, Jan 20, 2006
    #3
  4. You should include it inside <system.web> tag. It should look like this:

    <system.web>
    <httpRuntime executionTimeout="90" maxRequestLength="9216"
    useFullyQualifiedRedirectUrl="false" />
    </system.web>

    maxRequestLength="9216" is the max limit of files to upload and its 9MB or 9
    x 1024 KB.

    For more information:
    http://msdn.microsoft.com/library/d...-us/cpgenref/html/gngrfhttpruntimesection.asp

    Zeeshan.

    "ad" <> wrote in message
    news:%232FuZ%...
    > Thanks,
    > But I can't find MaxRequestLength in my Web.Config.
    > Which section which I will insert?
    >
    >
    > "Joey" <>
    > ???????:...
    >> Look into httpMaxRequestLength in the web.config file. You have to set
    >> this to get around the default value (that is 4MB, I think).
    >>
    >> Also, even when you do this you will be limited by the memory space on
    >> your PC, because the HttpFileUpload control copies the ENTIRE file to
    >> memory when uploading.
    >>
    >> We have seen about 700MB max filesize with this control, even after
    >> adjusting the config file from 60% to 80% on a dedicated web server.
    >>

    >
    >
     
    Zeeshan Muhammad, Jan 21, 2006
    #4
  5. ad

    ad Guest

    Thanks,
    Where can I find the document about the settings in web.config.
    I have study the msdn, but I can find them.



    "Zeeshan Muhammad" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > You should include it inside <system.web> tag. It should look like this:
    >
    > <system.web>
    > <httpRuntime executionTimeout="90" maxRequestLength="9216"
    > useFullyQualifiedRedirectUrl="false" />
    > </system.web>
    >
    > maxRequestLength="9216" is the max limit of files to upload and its 9MB or
    > 9 x 1024 KB.
    >
    > For more information:
    > http://msdn.microsoft.com/library/d...-us/cpgenref/html/gngrfhttpruntimesection.asp
    >
    > Zeeshan.
    >
    > "ad" <> wrote in message
    > news:%232FuZ%...
    >> Thanks,
    >> But I can't find MaxRequestLength in my Web.Config.
    >> Which section which I will insert?
    >>
    >>
    >> "Joey" <>
    >> ???????:...
    >>> Look into httpMaxRequestLength in the web.config file. You have to set
    >>> this to get around the default value (that is 4MB, I think).
    >>>
    >>> Also, even when you do this you will be limited by the memory space on
    >>> your PC, because the HttpFileUpload control copies the ENTIRE file to
    >>> memory when uploading.
    >>>
    >>> We have seen about 700MB max filesize with this control, even after
    >>> adjusting the config file from 60% to 80% on a dedicated web server.
    >>>

    >>
    >>

    >
    >
     
    ad, Jan 22, 2006
    #5
    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. james
    Replies:
    3
    Views:
    510
    Patrick Olurotimi Ige
    May 2, 2005
  2. ad
    Replies:
    4
    Views:
    491
    Patrice
    Jun 9, 2006
  3. Phil Z.
    Replies:
    14
    Views:
    13,508
    TongDing
    Jul 22, 2008
  4. E. Kwong
    Replies:
    1
    Views:
    422
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Nov 7, 2006
  5. E. Kwong

    FileUpload control - file size detection

    E. Kwong, Nov 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    6
    Views:
    194
    Steve C. Orr [MVP, MCSD]
    Nov 16, 2006
Loading...

Share This Page