在网上找了一下代码,代码如下:
修改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>

本文介绍如何通过修改Web.Config文件中的httpRuntime元素来调整ASP.NET应用程序的最大请求长度和执行超时时间,包括maxRequestLength和executionTimeout属性的具体设置方法。
1820

被折叠的 条评论
为什么被折叠?



