zoukankan      html  css  js  c++  java
  • System.Web.HttpException: Request timed out.

    executionTimeout parameter- indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.

    By default, the value of the executionTimeout attribute is set to 90 seconds in the Machine.config file. “Request timed out” error occurs when the processing time of request exceeds 90 seconds. In most cases an error occurs when you are uploading large files.

    To work around this problem, increase the time-out value of request execution.

    You can do that by following two ways:

    Method 1:
    EAUpload component provides a replacement of executionTimeout attribute of httpRuntime config section. If ExecutionTimeout parameter of EAUpload environment is defined then request have time-out that is specified by this parameter and "executionTimeout" parameter of httpRuntime configuration section is ignored. The specified value will take effect only for requests which are processed by EAUpload component. The value that is specified in executionTimeout attribute will be actually for other requests.

    Set the ExecutionTimeout parameter value in the EAUpload configuration

    • Open the Web.config file in Notepad.
    • Increase the value of the ExecutionTimeout attribute to avoid time-out errors.
      <?xml version="1.0" encoding="utf-8" ?>
      <configuration>
      ...
         <EasyAlgo.EAUpload>
             <Environment
                 ...                
      
                 ExecutionTimeout="3600"        
      
                 ...
             />
             <ErrorsProcessing
                  ...                   
              />
          </EasyAlgo.EAUpload>
      ... 
      </configuration>    
      
    • Save the Web.config file.

    Method 2:
    The executionTimeout attribute exists under httpRequest in the Machine.config file. You can change these settings either in the Web.Config file or in the Machine.config file. The default value for the time-out is 90 seconds. The executionTimeout attribute indicates the maximum number of seconds a request is permitted to run before being shut down by the ASP.NET Web application.

    Figure A: Set the executionTimeout attribute value in the Web.config File

    • Open the Web.config file in Notepad.
    • Add the httpRuntime element in the system.web section as follows:
      <?xml version="1.0" encoding="utf-8" ?>
      <configuration>
      ...
       <system.web>
         <httpRuntime executionTimeout="90" maxRequestLength="4096"
      	useFullyQualifiedRedirectUrl="false"
      	minFreeThreads="8"
      	minLocalRequestFreeThreads="4"
      	appRequestQueueLimit="100" />
       </system.web>
      ... 
      </configuration>
      
    • Increase the value of the executionTimeout attribute to avoid time-out errors.
    • Save the Web.config file.


    Figure B: the executionTimeout attribute value in the Machine.config File
    • Open the Machine.config file in Notepad. The Machine.config file is located in the %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\ directory.
    • In the Machine.config file, locate the httpRuntime element.
      <httpRuntime executionTimeout="90" maxRequestLength="4096"
      	useFullyQualifiedRedirectUrl="false"
      	minFreeThreads="8"
      	minLocalRequestFreeThreads="4"
      	appRequestQueueLimit="100" />
      
    • Increase the value of the executionTimeout attribute to avoid time-out errors.
    • Save the Web.config file.

    Configure ASP.NET HTTP runtime settings:
    http://msdn2.microsoft.com/en-us/library/e1f13641(vs.71).aspx

  • 相关阅读:
    UVA 10462 Is There A Second Way Left?(次小生成树&Prim&Kruskal)题解
    POJ 1679 The Unique MST (次小生成树)题解
    POJ 2373 Dividing the Path (单调队列优化DP)题解
    BZOJ 2709 迷宫花园
    BZOJ 1270 雷涛的小猫
    BZOJ 2834 回家的路
    BZOJ 2506 calc
    BZOJ 3124 直径
    BZOJ 4416 阶乘字符串
    BZOJ 3930 选数
  • 原文地址:https://www.cnblogs.com/oletan/p/1708147.html
Copyright © 2011-2022 走看看