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. Upload large files

Upload large files

Scheduled Pinned Locked Moved ASP.NET
helpquestion
4 Posts 4 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.
  • F Offline
    F Offline
    felopater
    wrote on last edited by
    #1

    hi all, when i try to upload large files (file length is bigger then maxRequestLength i recive error page(this page can't be displayed dns error) all i want to make is to find a way to display error page instead of this default error page. i tried to use custom error page but it doesn't work. does any one has idea? Thanks in advance.

    marcoryos

    S W S 3 Replies Last reply
    0
    • F felopater

      hi all, when i try to upload large files (file length is bigger then maxRequestLength i recive error page(this page can't be displayed dns error) all i want to make is to find a way to display error page instead of this default error page. i tried to use custom error page but it doesn't work. does any one has idea? Thanks in advance.

      marcoryos

      S Offline
      S Offline
      Sreenath Madyastha
      wrote on last edited by
      #2

      Can't you check ContentLength property of input file ? I am guessing you should get this properrty before you upload ? Else it is always a good idea to make use of page_error or Application_Error event to catch unknown errors.

      1 Reply Last reply
      0
      • F felopater

        hi all, when i try to upload large files (file length is bigger then maxRequestLength i recive error page(this page can't be displayed dns error) all i want to make is to find a way to display error page instead of this default error page. i tried to use custom error page but it doesn't work. does any one has idea? Thanks in advance.

        marcoryos

        W Offline
        W Offline
        WillemM
        wrote on last edited by
        #3

        Hmm, I think it would be even better to validate the size before even trying to upload the file. You can do this by adding a custom validator that checks the size of the file the user choose to upload with the maximum allowed size. This provides the user with a more friendly way of saying: No, you can't upload this.

        WM. What about weapons of mass-construction?

        1 Reply Last reply
        0
        • F felopater

          hi all, when i try to upload large files (file length is bigger then maxRequestLength i recive error page(this page can't be displayed dns error) all i want to make is to find a way to display error page instead of this default error page. i tried to use custom error page but it doesn't work. does any one has idea? Thanks in advance.

          marcoryos

          S Offline
          S Offline
          Sushant Duggal
          wrote on last edited by
          #4

          Hi, Maximum upload size for a file is mentioned in machine.config you can override the settings by mentining it in your project web.config

          Regards,

          Sushant Duggal.

          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