我需要更改executiontimeout
web.config 中特定于我的页面的设置。
我正在下载大文件。为此,我需要executiontimeout
单独更改下载页面。但是,如果我指定executiontimeout
某个值,它将适用于所有页面,而不仅仅是下载。但它不应该。
我需要executiontimeout
特定于我的下载的设置。如果可能的话,有什么建议吗?
我找到了一个解决方案
它是这样的:
<configuration>
<location path="Download.aspx">
<system.web>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2048000" executionTimeout="10240" />
<compilation debug="false" targetFramework="4.0"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
</location>
<system.web>
<!--httpRuntime maxRequestLength="512" useFullyQualifiedRedirectUrl="true" executionTimeout="45"/-->
<httpRuntime requestValidationMode="2.0" maxRequestLength="2048000"/>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
</configuration>