ASP. NET remove the restrictions on uploading large files

Source: Internet
Author: User

The general scheme for uploading large Web files is to process them at the HttpModule level. There are a lot of technical documents online, so it is not cumbersome.

To use this solution, you must set some configuration items in Web. config and run the client to upload large files:

This is the IIS configuration, and the following is the IIS7:

Configuration => system. webServer => security => requestFiltering => requestLimits

Several attributes of requestLimits:

MaxAllowedContentLength: maximum size of data to be uploaded. The default unit is byte: 30000000, about 28 M.

The maximum Url parameter length of maxQueryString. Default Value: 2048

The maximum Url Length of maxUrl. Default Value: 4096

This is the configuration of ASP. NET:

You also need to set the maxRequestLength of httpRuntime under system. Web to maxAllowedContentLength, which is measured in KB. The default value is 4 MB, which is why Asp.net cannot exceed 4 MB by default.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.