You must Sign In to post a response.
  • Category: ASP.NET

    Will it possible to upload more than 4 MB file size in asp.net?

    Hi

    I'm trying to upload more than 4 MB file with MaxRequestLength configuration value change in web.config for larger sizes with respect to IIS but i cant upload 50 MB file.

    can some one let me know how to achieve this in asp.net

    Thanks.
  • #769762
    Default ASP.NET allows 4 MB size file upload and to upload more than that i have changed MaxRequestLength in web.config for larger sizes with respect to IIS. also IIS restricts 30 MB and hence added below tags in web.config file to upload more 50 MB file size.

    <security>
    <requestFiltering >
    <requestLimits maxAllowedContentLength="1294967295">
    </requestLimits>
    </requestFiltering>
    </security>

    Thanks!
    B.Ramana Reddy

  • #769798
    Modify the maxAllowedContentLength setting in the web.config
    You can increase the maximum file size by modify the maxAllowedContentLength setting in the web.config file:
    <system.webServer>
    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="2147483648" />
    </requestFiltering>
    </security>
    </system.webServer>
    With the above maxAllowedContentLength, users can upload files that are 2 GB in size. This setting will work right away without restart IIS services.


  • Sign In to post your comments