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. PDF upload

PDF upload

Scheduled Pinned Locked Moved ASP.NET
helphtmlsysadmin
5 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.
  • I Offline
    I Offline
    izotov
    wrote on last edited by
    #1

    I try to use HTML element to upload files from web clients to server. It works very well except when I select a PDF file and submit the form containing the then I get to "The page cannot be displayed" error page. I have tried several file formats: GIF, JPG, DOC, TIFF ..., with these there are no problem only when I try to upload a PDF. (K)

    M 1 Reply Last reply
    0
    • I izotov

      I try to use HTML element to upload files from web clients to server. It works very well except when I select a PDF file and submit the form containing the then I get to "The page cannot be displayed" error page. I have tried several file formats: GIF, JPG, DOC, TIFF ..., with these there are no problem only when I try to upload a PDF. (K)

      M Offline
      M Offline
      Mariusz Wojcik
      wrote on last edited by
      #2

      Well, you should check your code again. PDF files uploads like all other files, so there must be some problem with the code. Maybe your PDF file is much bigger than other files you've tried to upload? Put your all uploading code into TRY...CATCH block and check what kind of error is generated (is there is one). -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)

      I 1 Reply Last reply
      0
      • M Mariusz Wojcik

        Well, you should check your code again. PDF files uploads like all other files, so there must be some problem with the code. Maybe your PDF file is much bigger than other files you've tried to upload? Put your all uploading code into TRY...CATCH block and check what kind of error is generated (is there is one). -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)

        I Offline
        I Offline
        izotov
        wrote on last edited by
        #3

        Well I have tested it on a quite small PDF and it works. It seems you are right. How can I make my server accept big files? (If there is a way...) It seems to me that there is no exception but the whole request is not handled, it doesn't reach the server code becouse I think the request is blocked when there is a big file to upload. (K)

        I 1 Reply Last reply
        0
        • I izotov

          Well I have tested it on a quite small PDF and it works. It seems you are right. How can I make my server accept big files? (If there is a way...) It seems to me that there is no exception but the whole request is not handled, it doesn't reach the server code becouse I think the request is blocked when there is a big file to upload. (K)

          I Offline
          I Offline
          izotov
          wrote on last edited by
          #4

          I have finally found it: in the Web.config, or in the Machine.config I had to set . :) (K)

          M 1 Reply Last reply
          0
          • I izotov

            I have finally found it: in the Web.config, or in the Machine.config I had to set . :) (K)

            M Offline
            M Offline
            Mariusz Wojcik
            wrote on last edited by
            #5

            Indeed, there is a property to determine max file upload size in ASP.NET. To everyone who need to upload big files:

            <configuration>
            <system.web>
            <httpRuntime maxRequestLength="40000"
            useFullyQualifiedRedirectUrl="true"
            executionTimeout="45">
            </system.web>
            </configuration>

            More info you can find at http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfHttpRuntimeSection.asp. -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)

            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