Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.NET File Upload

ASP.NET File Upload

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-net
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sdaniel_cst
    wrote on last edited by
    #1

    What is the max file size limit that can be uploaded by File Upload control? Can u give code to set the maximum file size in File Upload control? Thanks and Regards,

    sdaniel_cst

    P 1 Reply Last reply
    0
    • S sdaniel_cst

      What is the max file size limit that can be uploaded by File Upload control? Can u give code to set the maximum file size in File Upload control? Thanks and Regards,

      sdaniel_cst

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      The maximum file size is controlled via config file. The maximum size for .NET1/1.1 is 1GB. For .NET2 it is 2GB. By default, the size is 4096K (4MB). To change the size, you specify the following:

      <httpRuntime maxRequestLength="value in K" executionTimeout="3600" />
      

      It is not a good idea to let this value get too big because ASP.NET loads the item into memory as it is uploading, so large values quite often result in Out of Memory exceptions.

      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
      Deja View - the feeling that you've seen this post before.

      S 1 Reply Last reply
      0
      • P Pete OHanlon

        The maximum file size is controlled via config file. The maximum size for .NET1/1.1 is 1GB. For .NET2 it is 2GB. By default, the size is 4096K (4MB). To change the size, you specify the following:

        <httpRuntime maxRequestLength="value in K" executionTimeout="3600" />
        

        It is not a good idea to let this value get too big because ASP.NET loads the item into memory as it is uploading, so large values quite often result in Out of Memory exceptions.

        the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
        Deja View - the feeling that you've seen this post before.

        S Offline
        S Offline
        sdaniel_cst
        wrote on last edited by
        #3

        Thanks very much for your reply...

        sdaniel_cst

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups