在网上找了一下代码,代码如下:
修改Web.Config文件:
<?xml version="1.0" encoding="BIG5"?>
<configuration>
<system.web>
<httpRuntime maxRequestLength="512000" useFullyQualifiedRedirectUrl="true" executionTimeout="300"/>
</system.web>
</configuration>
我这里时间设置的是300,就是300秒。五分钟,这样就可以了,你也可以根据你的时间来设置
maxRequestLength这个是文件最大多少k ,也根据你的需要来设置。
<configuration>
<system.web>
<httpRuntime useFullyQualifiedRedirectUrl="true|false"
maxRequestLength="size in kbytes"
executionTimeout="seconds"
minFreeThreads="number of threads"
minFreeLocalRequestFreeThreads="number of threads"
appRequestQueueLimit="number of requests" />
</system.web>
</configuration>