Handling large file upload

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Handling large file upload

    Hi,

    I am writing an ASP.NET project where I allow users to upload files to
    the server. I have changed to web.config to allow a total file size of
    100MB. My problem is that if the total file size exceed this amount the
    page simply stops works, and I get a "Server unreachable" error.

    Is there any way to handle this, so I am able to present the user with
    a nice error message telling him that the maximum file size has been
    exceeded.

    Furthermore, it is my understanding that the server uploads all files
    to memory before I get to handle them with HtmlInputFile. Is there any
    way to perform some checking beforehand, by using http header handle or
    something?

    Examples will be appreciated.


    Thank you in advance,

    --
    Thomas Due
    Software Developer
    Scanvaegt Nordic A/S
    Thomas Due Guest

  2. Similar Questions and Discussions

    1. file upload is killing my server with large files
      I am using a cffile to upload files to a directory on my server. I have my memory up to a gig on the java settings on the cold fusoin admin. I have...
    2. large directory handling
      Hello all, I am trying empty a directory with over 4000 files with a script, and do not understand why I can only delete half at a time. I am...
    3. techniques for handling large text files
      Hi, If this question would be better posted to another perl list, please let me know. I have a very large text files (~2 GB) and it's in the...
    4. #17978 [Com]: Large file upload doesn't work remotely
      ID: 17978 Comment by: oxis at sodge dot org Reported By: daniel at pop3web dot com dot br Status: Bogus Bug...
    5. #17606 [Com]: File upload fails on large files
      ID: 17606 Comment by: rahuddleston at yahoo dot com Reported By: luimarma at iti dot upv dot es Status: Closed...
  3. #2

    Default Handling large file upload


    hi

    add httpruntime tag in WEB Config .. and add propery
    maxrequestlength.
    default value for maxrequestlength is around 4 MB u have
    to change it..

    by setting value for maxrequestlength will do.


    vrushal

    >-----Original Message-----
    >Hi,
    >
    >I am writing an ASP.NET project where I allow users to
    upload files to
    >the server. I have changed to web.config to allow a total
    file size of
    >100MB. My problem is that if the total file size exceed
    this amount the
    >page simply stops works, and I get a "Server unreachable"
    error.
    >
    >Is there any way to handle this, so I am able to present
    the user with
    >a nice error message telling him that the maximum file
    size has been
    >exceeded.
    >
    >Furthermore, it is my understanding that the server
    uploads all files
    >to memory before I get to handle them with HtmlInputFile.
    Is there any
    >way to perform some checking beforehand, by using http
    header handle or
    >something?
    >
    >Examples will be appreciated.
    >
    >
    >Thank you in advance,
    >
    >--
    >Thomas Due
    >Software Developer
    >Scanvaegt Nordic A/S
    >.
    >
    vrushal Guest

  4. #3

    Default Re: Handling large file upload

    Thomas
    > Furthermore, it is my understanding that the server uploads all files
    > to memory before I get to handle them with HtmlInputFile. Is there any
    > way to perform some checking beforehand, by using http header handle or
    > something?
    You need to use a third party product to do this type of thing. The fact
    that large uploads are cached in memory will likely cause ASP.NET to
    recycle/crash.

    We do one solution and I believe there is at least one other out there -
    though of course not as good as ours ;-).

    Best Wishes

    Jos

    ----------------------------------------------------------------------
    jos vernon
    [url]http://www.websupergoo.com[/url]
    ..NET Image Components & Consultancy
    ----------------------------------------------------------------------


    Jos Vernon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139