In my application, one query takes 3 minutes to execute. I found that Default ExecutionTimeout value is 110 sec.I tried to change this to 500 (seconds) but it didn't fix my problem. Somewhere I found that setting <compilation debug="false">
allows the ExecutionTimeout property to be configured. However, even this didn't solve my problem.
Does anyone know how I can increase the execution timeout for a long-running query?
To set timeout on a per page level, you could use this simple code:
Note: 60 means 60 seconds, this time-out applies only if the debug attribute in the compilation element is False.
in my case, I need to have my wcf running for more than 2 hours. Setting and did not work at all. The wcf did not execute longer than maybe 20~30 minutes. So I changed the idle timeout setting of application pool in IIS manager then it worked! In IIS manager, choose your application pool and right click on it and choose advanced settings then change the idle timeout setting to any minutes you want. So, I think setting the web.config and setting the application pool are both needed.
You can set
executionTimeout
in web.config to support the longer execution time.executionTimeout
specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET. MSDNThis make execution timeout to five minutes.
Optional Int32 attribute.
RE. "Can we set this value for individual page" – MonsterMMORPG.
Yes, you can (& normally should) enclose the previous answer using the location-tag.
e.g.
The above snippet is taken from the end of my own working web.config, which I tested yesterday - it works for me.
Execution Timeout is 90 seconds for
.NET
Framework 1.0 and 1.1, 110 seconds otherwise.If you need to change defult settings you need to do it in your
web.config
under<httpRuntime>
But Remember:
This time-out applies only if the debug attribute in the compilation element is False.
Have look at in detail about compilation Element
Have look at this document about httpRuntime Element
When a query takes that long, I would advice to run it asynchronously and use a callback function for when it's complete.
I don't have much experience with ASP.NET, but maybe you can use AJAX for this asynchronous behavior.
Typically a web page should load in mere seconds, not minutes. Don't keep your users waiting for so long!