File Upload size Problem

Discussion in 'Site Programming, Development and Design' started by Raji, Nov 29, 2010.

  1. Raji

    Raji Guest

    Hello,

    I have face a problem in uploading files of size 3MB.The server shows a page time out error in above 3 MB files.
    The default uploaded file size for a .net is 4MB.
    but i cant upload more than 3Mb.
    And i also included the code for increasing file upload size in web.config file , when i upload a file with size below 2.5 MB upload works fine.

    Please provide a solution to this issue.
     
  2. Ray

    Ray

    Do you have a URL were we can see the full error message?
     
  3. Raji

    Raji Guest

  4. Ray

    Ray

    When I run through your test I get a dialog box that reads you have pass 4 MB. This is not the server throwing the error but your application. The page is not timing out but somewhere in your code you have some kind of mechanism that limiting upload to less then 3 MB. First check your configuration file and make sure you update your requestfiltering element to have the proper maxallowedcontentlength settiongs. Try looking at this link.

    http://www.element-it.com/OnlineHelp/Webconfig.html

    I also believe there is a fileupload control in ASP.Net. You may want to check that to make sure you don't have set to less then 3 MB.
     
  5. Raji

    Raji Guest

    File upload issue.

    hello,
    Sometimes i try to upload a new pdf file unexpectedly it redirects to an error page attached here. For avoiding this situation i have used an alert message , but this code is not always executed. some times it dosent shows any alert and display directly to the attached error message page.

    Please try a pdf of file size 2.95Mb then u can see the issue..
    In my code I'm not using any special code for upload file i just use the code FileUploadPic.PostedFile.SaveAs(location); function in .net.


    In my code there is a filesize checking code and shows an alert for above 3 Mb file size and the normal asp.net built in SaveAs(string location) function is used.

    Please help me .
     

    Attached Files:

    • er3.jpg
      er3.jpg
      File size:
      71.3 KB
      Views:
      599
  6. Ray

    Ray

    Your application is too complicated to fully diagnose and troubleshoot correctly. There are too many other features that may be obscuring the root cause. Why don't you try creating a simple web application to perform the upload function. Create a subfolder and set it as an application folder and upload your test app there. That way it will be much easier and less complicated to go through the lines of code.
     
  7. Raji

    Raji Guest

    Please use this page for testing.

    http://www.charlottecatholic.org/uploadtest.aspx

    I have created anew page containing only file-upload control and a save button . when u try to submit the button, the file saved into a Temp folder in the current server.

    Here u can view the actual issue we are facing .

    Please help us to solve the issue.
     
  8. Ray

    Ray

    I just ran through your test and I was able to upload pdf files that are of sizes 2.5 MB, 3 MB, and 7 MB. They are all in your temp folder. There is definitely something in your code that is restricting the file upload size. Try running the on your test box and run it in debug mode. Step through the codes as you go through each of the steps to upload the file. You should be able to see in what portion of the code that is throwing that warning message in the window and you should start from there.
     
  9. Raji

    Raji Guest

    File upload problem

    Hello ,
    In the same page(http://www.charlottecatholic.org/uploadtest.aspx) i'm try to upload a .pdf file(http://www.birdlife.org/action/science/species/seabirds/tracking_ocean_wanderers.pdf) of size 4.76 MB.
    But I got an error.(the error message shown in the attached image).

    In my and my clients system it shows error in uploading files . But when you try this u haven't got any issue..

    error:
    'XML Parsing Error: no element found
    Location: http://www.charlottecatholic.org/uploadtest.aspx
    Line Number 1, Column 1:'
    why me and my client system shows this error.

    Please help me ..
     

    Attached Files:

    • err.jpg
      err.jpg
      File size:
      64.8 KB
      Views:
      584
  10. Raji

    Raji Guest

  11. Ray

    Ray

    Try it again, sometimes Chrome does not resolve a site correctly try refreshing it.

    The error...

    XML Parsing Error: no element found

    Is typically a web.config error. You may want to check and make sure all the elements are typed correctly. Remember, that the web.config file is XML base and it is very sensitive to upper case and lower case.

    I just ran through your test and downloaded the PDF file and use your test link http://www.charlottecatholic.org/uploadtest.aspx and I'm not getting any error. All I see on my end is that the upload was successful. Make sure your browser is not blocking the upload. For now set your browser security low when you run these tests. Or better yet make the URL a trusted site. Also try different browser version. Use Chrome, IE, FireFox, and even Safari.
     
  12. In Chrome's "Options," uncheck the DNS prefetch option and you shouldn't run into that problem.

    [​IMG]
     

    Attached Files:

    Last edited: Oct 14, 2015

Share This Page