asp.net,默认只允许上传2M文件,
对于需要上传大文件的应用,可以在web.config文件中更改限制。
在web.config文件中的<system.web>节中加入<httpRuntime/>,设置其属性就可以了。
如下:
<system.web>
<httpRuntime maxRequestLength="10240" executionTimeout="60" appRequestQueueLimit="100"/>
<customErrors mode="Off"/>
<compilation debug="true"/>
<authentication mode="Windows"/>
</system.web>
增加了<httpRuntime/>,则将上传大小的限制改为了,控制用户上传文件最大为10M,最长时间为60秒,最多请求数为100。