HttpException(0x80004005):请求超时ASP.Net
问题描述:
我只想问是否有一种方法来增加某个特定页面的executionTimeOut?而不是整个应用程序?HttpException(0x80004005):请求超时ASP.Net
<configuration>
<system.web>
<httpRuntime executionTimeout="90" maxRequestLength="4096" useFullyQualifiedRedirectUrl="false"
minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
</system.web>
</configuration>
答
Page.Server.ScriptTimeout = 90;
或者
use location element in config file
<configuration>
<location path="UploadPage.aspx">
<system.web>
<httpRuntime executionTimeout="90" maxRequestLength="4096" />
</system.web>
</location>
</configuration>
见To Increase Request Timeout only on particular Web Page和Increase ASP.Net timeout on a per page level
答
放于Web配置文件
<location path="Report.aspx">
<system.web>
<httpRuntime executionTimeout="3600" maxRequestLength="10240"/>
</system.web>
</location>