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.