ASP.NET 大文件上传

一 web.config 配置:

1).

<system.webServer>

<security>

<requestFiltering>

<!-- maxAllowedContentLength上传大小限制的值(单位:byte) -->

<requestLimits maxAllowedContentLength="1073741824" />

</requestFiltering>

</security>

</system.webServer>

2).

<system.web>

<httpRuntime executionTimeout="3600" maxRequestLength="1048576"/>

<!--maxRequestLength:上传的大小,单位KB; executionTimeout:设置超时时间,单位:秒。(默认是90秒) -->

</system.web>

注意:when set to "debug=true" mode, the runtime will ignore the timeout setting.

二.详细代码:

http://www.asp.net/web-api/overview/advanced/sending-html-form-data,-part-2