1

I need to alter the executiontimeout settings in web.config specific to my page.

I'm working on downloading large files. In order to do that I need to alter executiontimeout for download page alone. But if I specify the executiontimeout to some value, it will be applicable for all the pages and not just the download. But it shouldn't be.

I need executiontimeout settings specific to my download alone. Any suggestions if it's possible?

I found a solution this

Its something like this:

<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>
Cœur
  • 37,241
  • 25
  • 195
  • 267

0 Answers0