Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    May 17, 2011 @ 09:29
    Fuji Kusaka
    0

    Limit for file upload

     

    How can i upload file or more than 5mb by file upload?...My client has pdf files more than 5mb.

     

    Any suggestion?

     

    /fuji

  • Tom Maton 387 posts 659 karma points
    May 17, 2011 @ 09:46
    Tom Maton
    0

    Change the limit within your web.config

    <httpRuntime
        maxRequestLength="1048576"
        executionTimeout="3600"
      />

    change the maxRequestLength

    Tom

  • Michael Latouche 502 posts 816 karma points c-trib
    May 17, 2011 @ 09:51
    Michael Latouche
    0

    Hi Fuji,

    By default the limit for file upload in Asp.Net is 4Mb. You can override this in your web.config file, in the maxRequestLength attribute. For example, to allow 8Mb upload:

    <system.web>    
    <httpRuntime maxRequestLength="8192" ... />
    ...


    </system.web>

    Note that this is the length of the full request, including all form fields, viewstate etc.

    Hope this helps.

    Cheers,

    Michael.

    (Damn, just too slow to type ;-))

  • Fuji Kusaka 2203 posts 4220 karma points
    May 17, 2011 @ 09:59
    Fuji Kusaka
    0

    Thanks guys.

  • Fuji Kusaka 2203 posts 4220 karma points
    May 17, 2011 @ 12:40
    Fuji Kusaka
    0

    Tom I changed this line

    <httpRuntime requestValidationMode="2.0" />

     

    <httpRuntime    maxRequestLength="8576" executionTimeout="3600"  />

    What will be the consequences of removing

    requestValidationMode="2.0"
  • Michael Latouche 502 posts 816 karma points c-trib
    May 17, 2011 @ 12:52
    Michael Latouche
    0

    Hi Tom,

    Leaving it means you want to revert to the validation behavior of Asp.Net 2.0 instead of the validation behavior of Asp.Net 4. YOu can find some info about this at this url: http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes

    Cheers,

    Michael.

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies