C# 上传文件大小限制设置
(1)在web.comfig文件中添加一个httpRuntime主键
<httpRuntime executionTimeout="90"
maxRequestLength="40960" useFullyQualifiedRedirectUrl="false"
minFreeThreads="8" minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"/>
maxRequestLength="40960" 是最大的请求数,单位为:K
(2)修改C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config文件
<httpRuntime executionTimeout="190" maxRequestLength="40960"
maxRequestLength="40960" 是最大的请求数,单位为:K
<httpRuntime executionTimeout="90"
maxRequestLength="40960" useFullyQualifiedRedirectUrl="false"
minFreeThreads="8" minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"/>
maxRequestLength="40960" 是最大的请求数,单位为:K
(2)修改C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config文件
<httpRuntime executionTimeout="190" maxRequestLength="40960"
maxRequestLength="40960" 是最大的请求数,单位为:K