ASP. NET page request time-out setting server.scripttimeout executiontimeout

Source: Internet
Author: User


ASP. NET page Request time-out (page daemon execution time) The default value is 110 seconds ( 90 seconds for the default value in version 1.0 and 1.1 that is: server.scripttimeout =(httpserverutility.scripttimeout =) System.Web.Configuration.HttpRuntimeSection (). Executiontimeout.tostring () = 00:01:50(110 seconds) method One: Set the value of the Server.ScriptTimeout Note: Set the value must be greater than 90, otherwise it will not take effect, the request time-out value is still 90 seconds (online spread the argument, verified Error!!!) ) this time-out property is only applicable if the Debug property in the compilation element is False (true:scripttimeout=30 000000).          To avoid shutting down the application during debugging, do not set this timeout property to a large value.
Unit seconds server.scripttimeout = 60;
 

Method Two: Web. config configuration httpRuntime executiontimeout (per second)

Note: This time-out property is only applicable if the Debug property in the compilation element is False (true:scripttimeout=30000000). To avoid shutting down the application during debugging, do not set this timeout property to a large value. httpRuntime executiontimeout settings can modify the value of the server.scripttimeout , Use the scripttimeout property to programmatically set the timeout value to take precedence over the Web. config setting.
<system.web>    <compilation debug= "false" targetframework= "4.0"/>    <!--set to 600 seconds Server.ScriptTimeout =--and    
  method Three: Set the value of the Httpruntimesection.executiontimeout ( tested, invalid!!!) I don't know how to use it! )Https://msdn.microsoft.com/zh-cn/library/system.web.configuration.httpruntimesection.executiontimeout ( vs.80). aspx
System.Web.Configuration.HttpRuntimeSection configsection = new System.Web.Configuration.HttpRuntimeSection (); Configsection.executiontimeout = timespan.fromseconds (100);
 method Four: IIS configuration Modify script timeout valuethis indeterminate website → Advanced Settings:same as not determined application pool → advanced settings:   Note: If the page uses Updatepanel,updatepanel internal requests, the following two scenarios are available: Set the timeout value >=90 seconds, UpdatePanel internal Request Timeout will change to 90 seconds! ② Set the timeout value <90 seconds,the UpdatePanel internal Request Timeout will change to the value you set!  server.scripttimeout = 5 Seconds, click the UpdatePanel internal button, Thread.Sleep (20 * 1000) seconds, the request timed out, but the page can not see the error message! and click the UpdatePanel External button, you will be reported 1 "Request Timeout" error message! server.scripttimeout = 100 seconds, click the UpdatePanel internal button, Thread.Sleep (95 * 1000)//stop 95 seconds; Actually expires in 90 seconds (as shown in the second figure below)and click UpdatePanel External button, Thread.Sleep (95 * 1000)//Stop 95 seconds, the request succeeds!  =========================================================================================================== ============ Global Timeout TimeIf you have more than one Web site on the server and want to set the time-out uniformly, you need to set the Executiontimeout property value in the Machine.config file. The Machine.config file is located in the %systemroot%\microsoft.net\framework\%versionnumber%\config\ directory.
 

ASP. NET page request time-out setting server.scripttimeout executiontimeout

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.